This fixes a handful of basic things so that quinn-proto (with no default features) cleanly builds under the wasm32-unknown-unknown target, and can be used with a browser-based wasm-bindgen-test runner.
One of the transitive dependencies getrandom needs an additional feature to work in the browser
There is a warning about an unused import when the ring feature is not in use
There were some odd type inference failures:
Compiling quinn-proto v0.8.0 (/home/tk/repos/quinn/quinn-proto)
error[E0283]: type annotations needed
--> /home/tk/repos/quinn/quinn-proto/src/connection/streams/recv.rs:150:23
|
150 | if offset != final_offset.into() {
| ^^ ------------------- this method call resolves to `T`
| |
| cannot infer type
|
= note: multiple `impl`s satisfying `u64: PartialEq<_>` found in the following crates: `core`, `serde_json`:
- impl PartialEq for u64;
- impl PartialEq<serde_json::value::Value> for u64;
error[E0283]: type annotations needed
--> /home/tk/repos/quinn/quinn-proto/src/connection/streams/state.rs:285:26
|
285 | Ok(if bytes_read != final_offset.into() {
| ^^ ------------------- this method call resolves to `T`
| |
| cannot infer type
|
= note: multiple `impl`s satisfying `u64: PartialEq<_>` found in the following crates: `core`, `serde_json`:
- impl PartialEq for u64;
- impl PartialEq<serde_json::value::Value> for u64;
error[E0282]: type annotations needed
--> /home/tk/repos/quinn/quinn-proto/src/connection/mod.rs:746:62
|
746 | == self.path.max_udp_payload_size as _),
| ^ cannot infer type
|
= note: type must be known at this point
This fixes a handful of basic things so that
quinn-proto
(with no default features) cleanly builds under thewasm32-unknown-unknown
target, and can be used with a browser-basedwasm-bindgen-test
runner.getrandom
needs an additional feature to work in the browserring
feature is not in use