[TVM Discuss] [Questions] How to test wasm32 target on Rust runtime binding

2020-06-12 Thread Leon Wang via TVM Discuss
That's really frustrating, I have tried it again with `cdylib`, but even though I can compiled it into wasm file, but still can't load it successfully using `wasmtime`. --- [Visit Topic](https://discuss.tvm.ai/t/how-to-test-wasm32-target-on-rust-runtime-binding/6947/6) to respond. You a

[TVM Discuss] [Questions] How to test wasm32 target on Rust runtime binding

2020-06-12 Thread Leon Wang via TVM Discuss
I think I get what you were meaning, but actually what I wanted is to compiled this lib into test_wasm.wasm file, so I guess `cdylib` type is required to be set in Cargo.toml, have you tried compiled the lib again using `cdylib` crate-type? Thanks! --- [Visit Topic](https://discuss.tvm.a

[TVM Discuss] [Questions] How to test wasm32 target on Rust runtime binding

2020-06-12 Thread Morita Kazutaka via TVM Discuss
Dynamic linking does not work with wasm as far as I know. Please specify rlib, or staticlib if you want to use it from non-Rust programs. --- [Visit Topic](https://discuss.tvm.ai/t/how-to-test-wasm32-target-on-rust-runtime-binding/6947/4) to respond. You are receiving this because you e

[TVM Discuss] [Questions] How to test wasm32 target on Rust runtime binding

2020-06-12 Thread Leon Wang via TVM Discuss
@kazum Sorry for missing attaching the changes in Cargo.toml, actually I set crate-type to `cdylib`, is that something causing the problem? --- [Visit Topic](https://discuss.tvm.ai/t/how-to-test-wasm32-target-on-rust-runtime-binding/6947/3) to respond. You are receiving this because you

[TVM Discuss] [Questions] How to test wasm32 target on Rust runtime binding

2020-06-12 Thread Morita Kazutaka via TVM Discuss
I've tried your lib.rs and successfully created a static library. Please confirm that you set create-type to rlib in Cargo.toml. I could use the generated lib with the following simple main.rs. ``` extern crate test_wasm32; fn main() { test_wasm32::run(); } ``` Hope this helps you :)

[TVM Discuss] [Questions] How to test wasm32 target on Rust runtime binding

2020-06-11 Thread Leon Wang via TVM Discuss
Hi @tqchen @jroesch and others, I was working for embedding TVM Rust runtime for WASM target (see [here](https://github.com/leonwanghui/ms-backend-wasm/tree/master/wasm-backend-tvm) for the details), but came across some problems when building test-wasm32 crate. ## Error elaboration Firstly