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
add flag to allow putting out binary whenever (#312)
I'd like to build Rust code like this into `wasm32-unknown-unknown`.
https://github.com/Shikugawa/envoy-wasm-rust-playground/blob/master/example/src/lib.rs
This code is build with this build config.
https://github.com/Shikugawa/envoy-wasm-rust-playground/blob/master/example/Cargo.toml
We want to put out binary but not want to build with `--cargo-type=lib` but `--cargo-type=cdylib`. In the current implementation, we can't put out binary without using `--cargo-type=bin`. This was a critical problem for us so that patched this.
I'm considering to use this like this. This will put out `test_rust.wasm` with this command.
```
bazel build //:test_rust --platforms=@io_bazel_rules_rust//rust/platform:wasm
```
```
rust_binary(
name = "test_rust",
srcs = ["test_rust.rs"],
crate_type = "cdylib",
out_binary = True,
)
```
0 commit comments