Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Any intention of WebRTC Support? #10

Open
ValorZard opened this issue May 3, 2022 · 7 comments
Open

Any intention of WebRTC Support? #10

ValorZard opened this issue May 3, 2022 · 7 comments
Labels
enhancement New feature or request

Comments

@ValorZard
Copy link

You could also have it be cross platform with native apps by using something like webrtc-rs

@lucaspoffo lucaspoffo added the enhancement New feature or request label May 5, 2022
@lucaspoffo
Copy link
Owner

lucaspoffo commented May 5, 2022

Yes,

My goal for a future version would be to decouple the UdpSocket from the server/client. I'm not sure about the approach yet. Maybe I'll do something similar to what I did with the renetcode crate, where we have functions to process/generate packets that can be sent/received from any transport layer. Or, something like a Transport trait so I can use a dyn Trait and a simple send/receive API.

But independent of the approach, a UDP implementation would be provided. But the user could swap for other transport implementations: Async IO, WebRTC... could even do another UDP implementation that spawns another thread to do the message pooling.

Some changes and experimentation are required to do this, so I'll probably do it after the initial release.

@AceBunny
Copy link

AceBunny commented Aug 2, 2022

Sorry to bother, but do you have any updates on this or if it will happen in the foreseeable future? I'm interested on using your lib but support for UDP WebRTC is a requirement.

@erlend-sh
Copy link

erlend-sh commented Aug 9, 2022

I also asked about this today on behalf of @fishfolks, and received the following answer from Lucas on Discord:

It's something I will look into after 0.1 release:
I do an old draft with some idea on how I would do: #14
Then with the channel (or a Trait) , you could impl whatever transport for it
Someone would need to impl the trait for Web, since I don't really know wasm. Using naia-socket could be another way

Cheers! We might be able to help implement the trait for web if it seems feasible to do for our game.

@lucaspoffo
Copy link
Owner

lucaspoffo commented Aug 9, 2022

I made #36 to move this discussion forward. What would be necessary to make a WASM compatible transport layer for renet?
I made a simple Trait and impl it for Udp, now it's necessary to check what might need - if anything - for the wasm/webrtc implementation or any other desired backend.

@lucaspoffo
Copy link
Owner

With the release of https://github.com/lucaspoffo/renet/releases/tag/0.0.12, now it's possible to implement other backends for the transport layer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

5 participants
@erlend-sh @ValorZard @AceBunny @lucaspoffo and others