-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: avoid duplicate symbols #2
Conversation
This replaces the Vec of data with an array. Maybe there's better ways of initialising this, but it works.
There are a few more asm functions that need converting
Coming here from BLAKE3-team/BLAKE3#351, Just wanted to point out that what we ended up doing at our fork (fleek-blake3) was to import the platform from the upstream, instead of renaming the symbols. This can help with the final binary size since it does not include multiple symbols doing the same thing. I thought it might be helpful to point out here. Sorry if not. But check out the Cargo.toml modifications we had to do and the re-export of platform. |
IIUC you are never directly calling the original blake3 crate and instead rely on these symbols, which are not public for rust, being exposed by the linker anyway so they are sneakily used from the original crate. Interesting approach, it does indeed save some duplication. I'm not sure if it's more of a hack or not. I'm not really sure if I have a preference on either approach. |
We actually do make calls to the original crate. The Notice how in the diff we have removed all of the binding files ( /// Undocumented and unstable, for benchmarks only.
#[doc(hidden)]
- pub mod platform;
+ pub use blake3::platform; The next trick is to forward your crate features to the upstream, for that checkout
|
I like this approach. However, I guess we just release what we currently have to alleviate the duplicate symbol pain in the short term, and hope for the blake3-guts crate. If that takes longer, we will probably copy your approach. |
No description provided.