You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[target.'cfg(target_arch="wasm32")'.dependencies]
getrandom = { version = "0.3", features = ["wasm_js"] }
Then compile to wasm by: RUSTFLAGS='--cfg getrandom_backend="wasm_js"' cargo build --target wasm32-unknown-unknown
Error ocurs:
--> src/constants.rs:156:26
|
156 | min(SODIUM_SIZE_MAX, 4398046510080),
| ^^^^^^^^^^^^^
|
= note: the literal `4398046510080` does not fit into the type `usize` whose range is `0..=4294967295`
= note: `#[deny(overflowing_literals)]` on by default
error: literal out of range for `usize`
--> src/constants.rs:184:26
|
184 | min(SODIUM_SIZE_MAX, 4398046510080),
| ^^^^^^^^^^^^^
|
= note: the literal `4398046510080` does not fit into the type `usize` whose range is `0..=4294967295`
error: could not compile `dryoc` (lib) due to 2 previous errors
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Add this to Cargo.toml
Then compile to wasm by:
RUSTFLAGS='--cfg getrandom_backend="wasm_js"' cargo build --target wasm32-unknown-unknownError ocurs:
Beta Was this translation helpful? Give feedback.
All reactions