-
Notifications
You must be signed in to change notification settings - Fork 165
How to change memory limits for lucet-wasi #74
Comments
This may be related to #76. Until this is properly fixed, you can bump up the default limit here: https://github.com/fastly/lucet/blob/63fb151565b4794b2917fa13145c9d17e0db9e32/lucet-runtime/lucet-runtime-internals/src/alloc/mod.rs#L346 |
Thanks for the report! Indeed we need to expose those as configuration parameters. I've got it going on a branch now and will update this issue when it's merged. |
While we are at it, maybe someone knows how to correctly compile rust crates to wasm so that lucet can understand them? When I try to compile wasm file generated by wasm-pack that uses wasm-bindgen (the way I typically compile stuff for Chrome), I get an error:
If I comment out
|
The way you compile things for WASI is going to be different from how you compile for the browser today, though there is a polyfill for running WASI programs in the browser as well. To compile Rust to WASI, you'll need to use Alex's WASI fork of Rust available here: https://github.com/alexcrichton/rust/releases/tag/wasi3 Shortly after this PR is merged, you'll be able to just use a nightly compiler with |
In addition, if you need to specify a larger reserved size to |
This is now possible, as this blog post illustrates: https://hermanradtke.com/2019/04/01/wasi-example-using-rust-and-lucet.html Since both of the problems brought up here are now resolved, I'm going to go ahead and close this issue, but feel free to reach out if you have any more questions 🙂 |
I get the following error when trying to run my wasm app:
It indeed requires much more memory than that, how do I allow it to allocate more?
update: it seems that limits are specified during the compilation. I've tried to set them to 1 Gb:
But I still get the same error
The text was updated successfully, but these errors were encountered: