#web-rtc #udp-socket #transpiled #sockets #version #box #e-net

no-std rusty_enet

ENet for Rust (and wasm!) transpiled from C

6 releases

0.3.3 Aug 31, 2024
0.3.2 Aug 16, 2024
0.2.0 May 18, 2024
0.1.0 May 14, 2024

#1658 in Network programming

Download history 20/week @ 2024-07-28 377/week @ 2024-08-11 38/week @ 2024-08-18 99/week @ 2024-08-25 48/week @ 2024-09-01 1/week @ 2024-09-08 46/week @ 2024-09-15 10/week @ 2024-09-22 38/week @ 2024-09-29

338 downloads per month

MIT license

420KB
8K SLoC

rusty_enet

ENet transpiled to Rust, and made agnostic to the underlying socket. Supports std::net::UdpSocket out of the box. Works in WASM if you bring your own WebRTC interface or similar.

[dependencies]
rusty_enet = "0.3"

ENet Versions

rusty_enet ENet Commit
0.3 1.3.18 (enet/2662c0d)
0.2 1.3.18 (enet/2662c0d)
0.1 1.3.17* (enet/2a85cd6)

* indicates non-exact version (see commit)

Why?

From ENet's website:

ENet's purpose is to provide a relatively thin, simple and robust network communication layer on top of UDP (User Datagram Protocol). The primary feature it provides is optional reliable, in-order delivery of packets.

ENet omits certain higher level networking features such as authentication, lobbying, server discovery, encryption, or other similar tasks that are particularly application specific so that the library remains flexible, portable, and easily embeddable.

This Rust port allows using ENet with more than just UDP sockets. Most noteably, in WASM environments.

Project Status

The entire API has been wrapped in safe Rust bindings, and I've tested things pretty thoroughly in my own projects. Despite the low semver version, this project couldn't be much further from "ready for serious use".

There may have been some bugs introduced during the C -> Rust transpilation and cleanup, but I've been diligent to keep changes to the original code minimal, and double check those that were necessary.

Dependencies

~0–265KB