fix: move cdylib to separate float-wasm crate#173
Open
JuaniRios wants to merge 1 commit intoaudit/basefrom
Open
fix: move cdylib to separate float-wasm crate#173JuaniRios wants to merge 1 commit intoaudit/basefrom
JuaniRios wants to merge 1 commit intoaudit/basefrom
Conversation
The `cdylib` crate-type on `rain-math-float` causes Cargo to produce
output artifacts with colliding filenames (rlib and cdylib both generate
`librain_math_float.*`). On Linux, this results in `alloy_primitives`
being compiled as two separate crate instances, causing type mismatches
for any downstream crate that imports both `alloy_primitives` and
`rain_math_float`:
expected `FixedBytes<32>`, found a different `FixedBytes<32>`
note: two different versions of crate `alloy_primitives` are being used
See: rust-lang/cargo#6313
The fix moves `cdylib` to a dedicated `rain-math-float-wasm` wrapper
crate (`crates/float-wasm`), keeping the core library as `rlib`-only.
WASM consumers should depend on `rain-math-float-wasm` instead. Native
consumers are unaffected.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Contributor
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
📝 Coding Plan
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
cdylibfromcrate-typeincrates/float/Cargo.toml, keeping onlyrlibfloat-wasmcrate (crates/float-wasm/) as the WASM build targetBased on audited commit
fd7640f.See: rust-lang/cargo#6313