Skip to content

Commit 0444cd4

Browse files
[actors] Introduce Mailbox (#3739)
1 parent 1c65a16 commit 0444cd4

13 files changed

Lines changed: 1934 additions & 3 deletions

File tree

.github/workflows/publish.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,11 @@ jobs:
6060
continue-on-error: true
6161
env:
6262
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
63+
- name: Publish actor
64+
run: cargo publish --manifest-path actor/Cargo.toml
65+
continue-on-error: true
66+
env:
67+
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
6368
- name: Publish math
6469
run: cargo publish --manifest-path math/Cargo.toml
6570
continue-on-error: true

Cargo.lock

Lines changed: 16 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
[workspace]
22
members = [
3+
"actor",
34
"broadcast",
45
"codec",
56
"coding",
@@ -96,6 +97,7 @@ chacha20poly1305 = { version = "0.10.1", default-features = false }
9697
chrono = "0.4.39"
9798
clap = "4.5.18"
9899
colored = "3.0.0"
100+
commonware-actor = { version = "2026.4.0", path = "actor" }
99101
commonware-broadcast = { version = "2026.4.0", path = "broadcast" }
100102
commonware-codec = { version = "2026.4.0", path = "codec", default-features = false }
101103
commonware-coding = { version = "2026.4.0", path = "coding" }
@@ -134,7 +136,7 @@ ed25519-zebra = "4.1.0"
134136
either = "1.13.0"
135137
futures = "0.3.31"
136138
futures-timer = "3.0.3"
137-
futures-util = "0.3.31"
139+
futures-util = { version = "0.3.31", default-features = false, features = ["std"] }
138140
governor = "0.10.2"
139141
hashbrown = { version = "0.16.1", default-features = false, features = ["default-hasher"] }
140142
io-uring = "0.7.4"

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212

1313
_Primitives are designed for deployment in adversarial environments. If you find an exploit, please refer to our [security policy](./SECURITY.md) before disclosing it publicly (an exploit may equip a malicious party to attack users of a primitive)._
1414

15+
* [actor](./actor/README.md): Safely coordinate concurrent components.
1516
* [broadcast](./broadcast/README.md): Disseminate data over a wide-area network.
1617
* [codec](./codec/README.md): Serialize structured data.
1718
* [coding](./coding/README.md): Encode data to enable recovery from a subset of fragments.

actor/Cargo.toml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
[package]
2+
name = "commonware-actor"
3+
edition.workspace = true
4+
publish = true
5+
version.workspace = true
6+
license.workspace = true
7+
description = "Safely coordinate concurrent components."
8+
readme = "README.md"
9+
homepage.workspace = true
10+
repository = "https://github.com/commonwarexyz/monorepo/tree/main/actor"
11+
documentation = "https://docs.rs/commonware-actor"
12+
13+
[lints]
14+
workspace = true
15+
16+
[dependencies]
17+
cfg-if.workspace = true
18+
commonware-macros.workspace = true
19+
crossbeam-queue.workspace = true
20+
futures-util.workspace = true
21+
loom = { workspace = true, features = ["futures"], optional = true }
22+
parking_lot.workspace = true
23+
24+
[dev-dependencies]
25+
commonware-utils.workspace = true
26+
criterion.workspace = true
27+
futures.workspace = true
28+
29+
[features]
30+
loom = [ "dep:loom" ]
31+
32+
[lib]
33+
bench = false
34+
35+
[[bench]]
36+
name = "mailbox"
37+
harness = false
38+
path = "src/benches/bench.rs"

actor/README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# commonware-actor
2+
3+
[![Crates.io](https://img.shields.io/crates/v/commonware-actor.svg)](https://crates.io/crates/commonware-actor)
4+
[![Docs.rs](https://docs.rs/commonware-actor/badge.svg)](https://docs.rs/commonware-actor)
5+
6+
Safely coordinate concurrent components.
7+
8+
## Status
9+
10+
Stability varies by primitive. See [README](https://github.com/commonwarexyz/monorepo#stability) for details.

actor/src/benches/bench.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
use criterion::criterion_main;
2+
3+
mod mailbox;
4+
5+
criterion_main!(mailbox::benches);

0 commit comments

Comments
 (0)