syslog_proto

Crates.iosyslog_proto
lib.rssyslog_proto
version0.1.0-alpha0
created_at2025-10-20 03:29:01.331292+00
updated_at2025-10-20 03:29:01.331292+00
descriptionI/O-free implementation of the syslog protocol
homepagehttps://pub.npry.dev/syslog_proto
repositoryhttps://pub.npry.dev/syslog_proto
max_upload_size
id1891354
size56,920
Nathan Perry (npry)

documentation

https://docs.rs/syslog_proto

README

syslog_proto

This crate implements the syslog protocol as described in RFC5424. It intentionally does not implement any I/O functionality and provides protocol structures and parsing in a #![no_std]-compatible way.

The intent behind this crate was originally to support being a syslog receiver for nginx access logs — I was going to write a lightweight bridge that put them on NATS or MQTT, with the goal of making it easier to monitor and action recalcitrant scraper bots (while avoiding generating a huge access.log file that would require rotation). I found that geoip filtering was an easier approach, but was still interested in completing the crate because the alternatives I came across with a few quick Google searches (syslog, possibly others) only provide the message-generation logic and try to provide utility by integrating with the Rust logging ecosystem. The goal here is not to do that, but to expose the actual syslog message primitives at relatively low overhead.

I've yet to do any benchmarking or use this in anger. Some tests are included — it parses the example messages from the RFC, and there are some proptests that I ran with a reasonably high (100k) iteration count.

todo

  • fixup item visibilities
  • benchmarks
  • proptests on not-yet-covered types
  • actually write that nginx bridge / integrate it with something
  • #[deny(missing_docs)]
  • clippy lints
  • nix flake
  • code size profiling (i've yet to see how nom does)
  • allocation tracing: should be zero for parsing
  • structured data: well-known sd-name lookups
  • #[cfg_attr(feature = "serde", serde::Serialize, serde::Deserialize)]
Commit count: 0

cargo fmt