WASM support
Closed this issue · 1 comments
Stranger6667 commented
jsonschema
could be used right now in e.g. wasm32-wasip1
if compiled with --no-default-features
. However, there are a few usability issues that obscure the whole WASM story.
Documentation & error messages
- Add a separate section about WASM that will explain how to compile
jsonschema
and how to use it - Better compile errors, specifically for WASM (like tokio does)
Run tests on WASM
- Do not use
mockito
onwasm32
, but rather a custom in-memory resolver with all things. Actually, it could be an even better way to go outside of wasm - fewer deps, simpler & faster test suite. - Add another CI job for it (use
wasmtime
)
Demo website
Similar to what I have for https://css-inline.org, I'd like to have some bindings to run jsonschema
in a browser.
HTTP(S) reference resolving
In a browser, it could be feasible to use some custom resolver that will use wasm-bindgen-futures to make calls (or reqwest
), but it will require support for non-blocking resolving.
Stranger6667 commented
Running test suite will come later, as well as js bindings & a website