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
Benchmarking has determined that the default wasm stack size is 1 MiB. This is quite a lot for small server environments, thus in the C++ SDK we set both stack size and initial heap to 64 KiB: proxy-wasm/proxy-wasm-cpp-sdk#174
Is there a good way to get the Rust SDK to influence / set this value? It's not ergonomic for every user of proxy-wasm-rust-sdk to define their own build.rs file or config.toml file or use command line build parameters.
There is one way I know to accomplish this, but it comes with caveats:
Add this line to the SDK's build.rs: println!("cargo:rustc-cdylib-link-arg=-zstack-size=65536");
It also generates a build warning: warning: [email protected]: cargo:rustc-cdylib-link-arg was specified in the build script of proxy-wasm v0.2.3-dev (/usr/local/google/home/mstevenson/git/proxy-wasm-rust-sdk), but that package does not contain a cdylib target
Benchmarking has determined that the default wasm stack size is 1 MiB. This is quite a lot for small server environments, thus in the C++ SDK we set both stack size and initial heap to 64 KiB: proxy-wasm/proxy-wasm-cpp-sdk#174
In Rust the stack size can be set as follows:
-Clink-args=-zstack-size=65536
RUSTFLAGS="-Clink-args=-zstack-size=65536" cargo build ...
println!("cargo:rustc-cdylib-link-arg=-zstack-size=65536");
rustflags = ["-C", "link-args=-zstack-size=65536"]
Is there a good way to get the Rust SDK to influence / set this value? It's not ergonomic for every user of proxy-wasm-rust-sdk to define their own build.rs file or config.toml file or use command line build parameters.
There is one way I know to accomplish this, but it comes with caveats:
println!("cargo:rustc-cdylib-link-arg=-zstack-size=65536");
rustc-cdylib-link-arg
transitive warning rust-lang/cargo#9562warning: [email protected]: cargo:rustc-cdylib-link-arg was specified in the build script of proxy-wasm v0.2.3-dev (/usr/local/google/home/mstevenson/git/proxy-wasm-rust-sdk), but that package does not contain a cdylib target
CC @mpwarres @PiotrSikora
The text was updated successfully, but these errors were encountered: