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

Publish a wasm build so Crosshair can be used on the client-side web #314

Open
Zac-HD opened this issue Oct 11, 2024 · 5 comments
Open

Publish a wasm build so Crosshair can be used on the client-side web #314

Zac-HD opened this issue Oct 11, 2024 · 5 comments

Comments

@Zac-HD
Copy link
Contributor

Zac-HD commented Oct 11, 2024

Once Z3 has a python-wasm build (Z3Prover/z3#7418), the only thing between me and client-side demos of Hypothesis + Crosshair is a little bit of native code in Crosshair itself. (since it's pure-python, hypothesis-crosshair already works)

Not urgent but it would be very cool to get this demo working 😁

@pschanely
Copy link
Owner

Oooh. That would be fun. Just starting to look at this stuff. cibuildwheel suggests that pyodide is supported in 3.12, but that PyPI doesn't yet support it. So does "publish" essentially just mean the creation of a correct meta.yaml file?

@Zac-HD
Copy link
Contributor Author

Zac-HD commented Oct 13, 2024

Noting that this won't help much until Z3 goes through the same process, we can either do a pyodide in-tree or out-of-tree build (newer docs). micropip.install(url) works, so I think there's good reason to imitate Numpy and go with out-of-tree.

This is all still pretty experimental still - wasm is a tier two CPython platform though so I do expect things to stabilize eventually.

@Zac-HD
Copy link
Contributor Author

Zac-HD commented Nov 16, 2024

Z3 now has a wasm wheel (🎊), which I think puts this back in your hands!

@pschanely
Copy link
Owner

I'll take a look today! You'd be ok with any publicly-accessible URL for the wheel I presume?

@pschanely
Copy link
Owner

Made progress today. Looks like I'll need to relax my z3 version constraint and try again, but I'm close.

I suppose if all this works, I should re-do https://crosshair-web.org too.

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

No branches or pull requests

2 participants