Stream: wasmtime

Topic: Test Organization


view this post on Zulip Cwasi4wasm (Oct 06 2023 at 13:57):

How is everyone organizing their test? I have unit tests that are dependent on a specific wasm but it feels dirty for some strange reason. I was trying to generate the wat file and maybe compile in the tests but for what we are doing doubt it will be worth the effort. How is everyone going about this?

view this post on Zulip Lann Martin (Oct 06 2023 at 13:59):

spin (Rust) has a lot of test code that gets compiled in build.rs for tests

view this post on Zulip Lann Martin (Oct 06 2023 at 14:00):

I wrote this internal crate to aid with that, which might be a useful starting point: https://github.com/fermyon/cargo-target-dep

Contribute to fermyon/cargo-target-dep development by creating an account on GitHub.

view this post on Zulip Lann Martin (Oct 06 2023 at 14:01):

(assuming Rust)

view this post on Zulip Joel Dice (Oct 06 2023 at 14:01):

wasm-tools has a lot of hand-written wat files for testing. wit-bindgen compiles source code for various languages to wasm and runs tests against those.

view this post on Zulip Cwasi4wasm (Oct 06 2023 at 14:03):

Awesome these are all great I will take a look at them


Last updated: Nov 22 2024 at 17:03 UTC