Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

allow bolero tests to run on wasm32-unknown-unknown #204

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Ekleog
Copy link
Contributor

@Ekleog Ekleog commented Jan 19, 2024

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.

@Ekleog
Copy link
Contributor Author

Ekleog commented Jan 20, 2024

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.

@camshaft
Copy link
Owner

camshaft commented Mar 4, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants