Proof of concept mechanical port of ircnet/ircd to Rust as part of a bit about C being insecure for network services
0

Configure Feed

Select the types of activity you want to include in your feed.

ircd.rs / leveva-message / Cargo.toml
1.1 kB 27 lines
1[package] 2name = "leveva-message" 3version = "0.0.0" 4edition = "2021" 5publish = false 6description = "Building and parsing RFC 1459 / IRCv3 protocol lines — the wire Message type, its builder, and the parser, with grapheme-aware line-length capping." 7 8# Extracted from `leveva` (the IRC daemon) as a self-contained leaf library: the 9# message model is generic over `impl Display` for its parts, so it carries no 10# dependency on leveva's typed identifiers or server runtime. `leveva` re-exports it 11# as `leveva::message`. 12[lib] 13path = "src/lib.rs" 14 15[dependencies] 16# Grapheme-cluster segmentation (UAX #29): the non-tag body limit (`LINELEN`) is 17# measured in graphemes, not bytes, so a 2048-character line of multi-byte text is 18# fully supported. 19unicode-segmentation = "1" 20# A recorded message round-trips through a single JSON column (chat-history replay), 21# so `Message` and its tag map derive Serialize/Deserialize. 22serde = { version = "1", features = ["derive"] } 23 24[dev-dependencies] 25# Property tests: the parse/build round-trip and the serde-JSON round-trip. 26proptest = "1" 27serde_json = "1"