-
Sadly I am exceeding the default memory limit of 1GB in my wasm build and naturally my first idea was to increase the limit... setting in config.toml:
setting env var directly modifying pkg/rust_lib_*.js's (maximum: 16384 -> 16384 * 4)
At this point im desperate for anything to point me in the right direction, I can't seem to figure it out... |
Beta Was this translation helpful? Give feedback.
Answered by
kjzl
May 26, 2024
Replies: 1 comment 7 replies
-
Hi, could you please show error logs about exceeding memory? |
Beta Was this translation helpful? Give feedback.
7 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Actually it seems I just fucked up by not exporting the env variables RUSTFLAGS and RUSTUP_TOOLCHAIN you define at https://github.com/fzyzcjy/flutter_rust_bridge/blob/193f5d0be3b4f16cab454d3e4e83c2bde9ed94ac/frb_dart/lib/src/cli/build_web/executor.dart#L162C6-L162C9
But in realizing you explicitly set the environment for wasm-pack I tested exporting RUSTFLAGS with the -C link-arg=--max-memory=4294967296 and then running wasm-pack, and yes, indeed this solved the problem.