snix/ops/posix_mq.rs
sterni dd5100acf5 chore: rewrite uses of cs.tvl.fyi to code.tvl.fyi
I've checked the new links manually.

- //web/tvl: changed the target path of links to the tvix docs since
  they were moved in r/2378.

- //users/aspen/resume: Tvix is no longer //third_party/nix.

Change-Id: I419bae1a46bdccc7baa7327215aa2368ffc0f01c
Reviewed-on: https://cl.tvl.fyi/c/depot/+/13043
Reviewed-by: aspen <root@gws.fyi>
Tested-by: BuildkiteCI
Autosubmit: sterni <sternenseemann@systemli.org>
Reviewed-by: fogti <fogti+devel@ytrizja.de>
Reviewed-by: tazjin <tazjin@tvl.su>
2025-01-30 02:19:06 +00:00
..
src style(rust): Format all Rust code with rustfmt 2022-02-08 12:06:39 +00:00
.gitignore feat(ops/posix_mq.rs): Set up Nix build 2020-01-20 11:59:21 +00:00
Cargo.lock chore(mq_cli): prepare new release 2022-02-05 13:37:31 +00:00
Cargo.toml chore: rewrite uses of cs.tvl.fyi to code.tvl.fyi 2025-01-30 02:19:06 +00:00
CODE_OF_CONDUCT.md Add 'ops/posix_mq.rs/' from commit 'f7d1a38da6' 2020-01-20 11:32:02 +00:00
default.nix chore: Rename pkgs->depot in all Nix file headers 2020-02-21 13:54:53 +00:00
LICENSE chore(ops/posix_mq.rs): Update crate dependencies to recent versions 2020-01-20 11:51:24 +00:00
README.md chore: rewrite uses of cs.tvl.fyi to code.tvl.fyi 2025-01-30 02:19:06 +00:00

posix_mq

crates.io

This is a simple, relatively high-level library for the POSIX message queue API. It wraps the lower-level API in a simpler interface with more robust error handling.

Check out this project's sister library in Kotlin.

Usage example:

// Values that need to undergo validation are wrapped in safe types:
let name = Name::new("/test-queue").unwrap();

// Queue creation with system defaults is simple:
let queue = Queue::open_or_create(name).expect("Opening queue failed");

// Sending a message:
let message = Message {
  data: "test-message".as_bytes().to_vec(),
  priority: 0,
};
queue.send(&message).expect("message sending failed");

// ... and receiving it!
let result = queue.receive().expect("message receiving failed");

Development

Development happens in the TVL monorepo.

Starting from version 3771.0.0, the version numbers correspond to revisions of the TVL repository, available as git refs (e.g. refs/r/3771).

See the TVL documentation for more information about how to contribute to the codebase.