Comments (6)
I was talking about WebSockets. Emscripten already an API for using WebSockets: https://emscripten.org/docs/porting/networking.html.
I'm not saying that the WebTransport should or should not try to build on this layer, but its something that we should consider. Whoever takes on this task should certainly have a good understanding of all the current networking APIs in emscripten and how they overlap.
from emscripten.
I'm interested in this as well and had looked a while back to see if anyone was standardizing on a C API for WebTransport and hadn't found anything yet.
(I stubbed out a crate for adding a C API to the Rust wtransport
library, but haven't actually written any of the FFI yet as I hadn't found someone else doing similar yet. I thought it would be ideal if there were a native library with the same API as whatever happens in Emscripten.)
from emscripten.
Do you think it will be possible to implement most of this withing the existing WebSockets APIs that emscripten has, or would it need to be completely new API?
From the MDN page is sounds like this is kind of an extension of the existing WebSockets: "The WebTransport API provides a modern update to WebSockets".. so maybe we can do this with minimal user-visible change?
from emscripten.
@sbc100 If you were talking about POSIX sockets, then perhaps?
But if you're talking about the WebSocket API, IMHO I feel like there's a few functions like reliability()
, datagrams()
, congestion_control()
, that are not available in WebSockets. I imagine a major benefit of WebTransport is that it allows finer grain control over networking.
Unless you were creating some general abstraction layer and was very explicit about that, I feel it'd be quite confusing to extend the WebSockets API with WebTransport functionality. From the perspective of a new user, I personally would be going "where is the WebTransport API", at least initially until reading further into some documentation that mentions this. It seems intuitively confusing. I would feel the same way if it were done this way for WebRTC.
from emscripten.
I'm interested in this as well and had looked a while back to see if anyone was standardizing on a C API for WebTransport and hadn't found anything yet.
(I stubbed out a crate for adding a C API to the Rust
wtransport
library, but haven't actually written any of the FFI yet as I hadn't found someone else doing similar yet. I thought it would be ideal if there were a native library with the same API as whatever happens in Emscripten.)
If you would like to get started on this, you could make a draft PR against Emscripten with some API proposal similar to websocket.h, but for WebTransport
.
I'm a bit busy at the moment, but I'd potentially be interested in contributing. I think it would at least get the ball rolling. Two heads (or more) are better than one.
from emscripten.
Any updates on this? I'm also highly interested in the applications for this, especially multiplayer games in the browser.
from emscripten.
Related Issues (20)
- Converting pointers in function signature to int
- AppleSilicon will not load debug project when -fwasm-exceptions is used in C++ and Link Flags HOT 2
- Missing mmap()/munmap()/mremap() features for in-place adjustment of anonymous mappings HOT 10
- In `v3.1.58`, why pthreads don't inherit the `moduleArg`? HOT 18
- 3.1.58 breaks usage in Node.js worker HOT 5
- pthread initialization for 40 pthreads takes 5.8seconds because of 40 separate network roundtrips.. HOT 11
- -s USE_SDL=2 in compile doesn't choose correct header files any longer HOT 10
- Web audio typescript generation failure HOT 1
- Inflexible web audio worklet module query HOT 1
- Question: -sMAIN_MODULE=1 and -sEXPORTED_FUNCTIONS warning no longer valid? HOT 3
- `-sMAIN_MODULE=2` with `-pthread` misses exports `__emscripten_thread_crashed` and `__embind_initialize_bindings` HOT 6
- Behavior differs from x86-64 binary HOT 3
- Too many local (according to nodejs) in generated Wasm module HOT 1
- Generated Wasm module fails with "stack overflow" / "memory access out of bounds" (nodejs runtime error) HOT 1
- wasm64: html5 callbacks throw type error when proxying to pthread
- --embind-emit-tsd / --emit-tsd do not work with dynamic linkage HOT 2
- Scanning C++ Modules fails HOT 1
- Catch2 Error: A type specifier is required for all declarations HOT 1
- WasmFS: Use "readwrite-unsafe" in OPFS backend
- Allow user to pass integer into embind exported function taking pointer
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from emscripten.