Skip to content

Commit 4767040

Browse files
committed
0.1.0
1 parent c568adc commit 4767040

File tree

4 files changed

+28
-5
lines changed

4 files changed

+28
-5
lines changed

CHANGELOG.md

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# 0.1.0
2+
- Initial release

Cargo.toml

+10
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,16 @@
22
name = "rusty_enet"
33
version = "0.1.0"
44
edition = "2021"
5+
description = "ENet for Rust (and wasm!) transpiled from C."
6+
homepage = "https://github.com/jabuwu/rusty_net"
7+
repository = "https://github.com/jabuwu/rusty_net"
8+
readme = "README.md"
9+
license = "MIT"
10+
exclude = [
11+
"/.github",
12+
"/ci",
13+
"/examples",
14+
]
515

616
[target.'cfg(target_arch = "wasm32")'.dependencies]
717
js-sys = "0.3.69"

README.md

+11
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22

33
[ENet](https://github.com/lsalzman/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.
44

5+
```
6+
[dependencies]
7+
rusty_enet = "0.1"
8+
```
9+
510
## Why?
611

712
From [ENet's website](http://sauerbraten.org/enet/):
@@ -11,3 +16,9 @@ From [ENet's website](http://sauerbraten.org/enet/):
1116
> 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.
1217
1318
This Rust port allows using ENet with more than just UDP sockets. Most noteably, in WASM environments.
19+
20+
## Project Status
21+
22+
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".
23+
24+
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.

ci/src/main.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,6 @@ bitflags! {
2020
}
2121

2222
fn main() -> anyhow::Result<()> {
23-
std::env::set_var("RUSTFLAGS", "-D warnings");
24-
2523
let arguments = [
2624
("check", Check::CHECK),
2725
("wasm-check", Check::WASM_CHECK),
@@ -79,12 +77,14 @@ fn main() -> anyhow::Result<()> {
7977

8078
fn check(sh: &Shell, target: Target) -> anyhow::Result<()> {
8179
let target_flags = &target.flags();
82-
cmd!(sh, "cargo check {target_flags...}").run()?;
80+
cmd!(sh, "cargo rustc {target_flags...} -- -D warnings").run()?;
8381
Ok(())
8482
}
8583

8684
fn example_check(sh: &Shell) -> anyhow::Result<()> {
87-
cmd!(sh, "cargo check --examples").run()?;
85+
for example in ["client", "read_write", "server"] {
86+
cmd!(sh, "cargo rustc --example {example} -- -D warnings").run()?;
87+
}
8888
Ok(())
8989
}
9090

@@ -114,6 +114,6 @@ fn doc_check(sh: &Shell) -> anyhow::Result<()> {
114114
}
115115

116116
fn clippy(sh: &Shell) -> anyhow::Result<()> {
117-
cmd!(sh, "cargo clippy --workspace --all-targets").run()?;
117+
cmd!(sh, "cargo clippy --workspace --all-targets -- -D warnings").run()?;
118118
Ok(())
119119
}

0 commit comments

Comments
 (0)