a.k.a. xwebtransport and Cross WebTransport.
A common WebTransport interface for browser and native.
Work in progress. The project is slowly maturing.
You can still peek around, but be aware that I might force-push master
occasionally.
If you don't mind that - feel free to join the fun right away!
We use a small tool called cargo-advrunner under the hood for a bit more
advanced compatibility of the cargo run / cargo test commands.
Install it via cargo install -f cargo-advrunner.
Next, the following tools are also required:
-
wasm-bindgen-test-runner- from thewasm-bindgen-clicrate; the runner harness for running the WASM tests in a browser environmentInstall with:
cargo install -f wasm-bindgen-cliYou might have to adjust the command above to install a particular version if you see a message to do so down the road. Also, there is sometimes a need to bump the
wasm-bindgenin the lockfile - usually when thewasm-server-runneris too far in the futurewasm-server-runner-version wise from us. -
wasm-server-runner- from thewasm-server-runnercrate; the runner harness for running a dev server to server the WASM modules in a browserInstall with:
cargo install -f wasm-server-runner
Then you should be able to intuitively use cargo:
cargo build- native buildcargo test- native testscargo run --bin ...- run a native executablecargo build --target wasm32-unknown-unknown- WASM buildcargo test --target wasm32-unknown-unknown- WASM testscargo run --target wasm32-unknown-unknown --bin ...- run a WASM module in a dev server
We have an E2E test suite that is supposed to ensure the drivers behave more or less the same.
To set up the transient state (generate the certs and etc) do:
cargo build --testsYou might have to run this command again in the future to regenerate the certificates that have a lifetime of two weeks (the WebTransport max for the sha256-authenticated certificates, i.e. when not using WebPKI).
Also, the
bin/clear-certscommand might come in handy.
-
Run the test server.
cargo run --bin xwt-test-server
-
Run the native tests.
cargo test -
Run the WASM tests.
bin/wasm-test
For this step, you might have to install some extra dependencies; you can use
bin/wasm-test-setupto help with that.
See examples/microapp for more info.