quinn-rs / quinn

Async-friendly QUIC implementation in Rust
Apache License 2.0
3.76k stars 380 forks source link

Wasm/web support? #1388

Closed FredrikNoren closed 2 years ago

FredrikNoren commented 2 years ago

Hey guys,

Do you have any plans to support wasm as a target for quinn? (On the web I mean, i.e. being able to compile a project with quinn and then running it on a website).

Ralith commented 2 years ago

For very good security reasons, webpages cannot send/receive arbitrary UDP packets, so it is impossible to run a QUIC implementation inside one. You might be interested in WebTransport an upcoming web standard that will allow similar capabilities.

FredrikNoren commented 2 years ago

@Ralith Ok, thank you!

timvw01 commented 1 year ago

@Ralith Would this also apply for a rust / quinn client in wasm32-unknown-unknown? Where can i find more info on this?

Thanks.

Ralith commented 1 year ago

I don't think wasm32-unknown-unknown defines any socket APIs at all, so that will depend on what nonstandard APIs your specific runtime environment provides.

cBournhonesque commented 1 year ago

Hi, just so I understand:

Ralith commented 1 year ago

See https://github.com/quinn-rs/quinn/issues/1388#issuecomment-1199750713.

tbillington commented 8 months ago

Just for completeness, would quinn support webtransport once it's released, or is that explicitly not a planned feature/target?

For context am building a project in bevy using quinn and evaluating what it would take to support WASM :) cheers

Ralith commented 8 months ago

There are now implementations of WebTransport that use Quinn, e.g. https://github.com/kixelated/webtransport-rs. Quinn is a QUIC implementation, and WebTransport is built on top of (HTTP/3 which is built on top of) QUIC.