Open Ekleog opened 9 months ago
Disclaimer: I ended up not being able to actually use cargo-bolero, because there's no async executor that works well on the web except the browser's, and for_each
is not async-ready.
I looked into making for_each
async, but it looked like an intricate mess of types, so I gave up.
I still think this can be useful for people who want to test sync code, but for my use case it's actually unfortunately not enough.
I like the idea of supporting wasm. But I think we'll need tests in place so we don't accidentally regress before merging something like this.
This PR allows crate developers to run
bolero::check!()
tests on wasm32-unknown-unknown.This is not fuzzing yet, but at least basic proptesting works there, with this PR :)
Considering the infrastructure required for testing (all the wasm-bindgen stuff), I'm not submitting a new test here; but I checked on the repo with my use case that a test that takes an
u8
and matches for!= 4
did fail as expected.Basing the test on target_os should also (hopefully) make bolero work for embedded development proptesting.