fraktor-rs は、Apache Pekko と Proto.Actor に着想を得た、仕様駆動の Rust アクターランタイムです。
ランタイムは no_std の core クレートと std の adaptor クレートに分けて開発されており、可搬性の高い状態機械と契約を、Tokio、ネットワーク、ホストランタイムの binding から分離しています。
ルートの fraktor-rs クレートは、現時点ではプロジェクトメタデータの公開とパッケージ名の予約を担っています。
ランタイム API は modules/ 配下の workspace クレートにあり、動作を確認する最短の入口は実行可能な fraktor-showcases-std の example 群です。
- actor kernel、typed actor、persistence、remote、cluster、stream、共通 utilities を
no_stdcore クレートとして提供します stdadaptor クレートが、Tokio executor、TCP transport、std lock、materializer、cluster delivery helper などのホスト依存部分を分離します- actor system、supervision、death watch、routing、dispatcher、mailbox、event stream、serialization、remoting、clustering、persistence、stream processing など、Pekko / Proto.Actor 由来の意味論を取り込んでいます
- std showcase で、legacy typed flow、Pekko classic/kernel example、typed example、stream example、advanced remote/persistence scenario を実行できます
- OpenSpec artifact、リポジトリルール、カスタム dylint、CI スクリプトにより、設計意図、モジュール境界、実装チェックをそろえています
rustup- Rust toolchain
nightly-2025-12-01(rust-toolchain.tomlで固定) - フルローカルチェックを実行する場合は
cargo-dylint、rustc-dev、llvm-tools-preview
git clone git@github.com:j5ik2o/fraktor-rs.git
cd fraktor-rs
rustup toolchain install nightly-2025-12-01 --component rustfmt --component clippydylint を含むフル検証を行う場合:
rustup component add rustc-dev llvm-tools-preview --toolchain nightly-2025-12-01
cargo install cargo-dylint dylint-linkcargo run -p fraktor-showcases-std --example getting_startedその他の example:
cargo run -p fraktor-showcases-std --example typed_first_example
cargo run -p fraktor-showcases-std --example stream_first_example
cargo run -p fraktor-showcases-std --features advanced --example remote_lifecycle
cargo run -p fraktor-showcases-std --features advanced --example typed_persistence_effectorcargo test -p fraktor-rs
./scripts/ci-check.sh ai allルート facade が統合ランタイムモジュールを公開するまでは、必要な API 領域を持つクレートを直接使います。
showcase クレートは、実行可能な flow の現時点の利用インデックスです。
cargo run -p fraktor-showcases-std --example request_reply
cargo run -p fraktor-showcases-std --example kernel_supervision
cargo run -p fraktor-showcases-std --example typed_actor_lifecycle
cargo run -p fraktor-showcases-std --example stream_graphstyped persistence effector は、通常の typed Behavior を維持したまま hidden child store actor に永続化を委譲します。最小形は次のように PersistenceEffector::props で aggregate actor を作ります。
let props = PersistenceEffector::props(config, |state, effector| {
Ok(account_behavior(state, effector))
});example の一覧と必要な feature は showcases/std/README.md を参照してください。
| パス | 役割 |
|---|---|
src/ |
ルート fraktor-rs クレートの placeholder とパッケージメタデータ |
modules/utils-core |
可搬性の高い collection、sync primitive、time helper、atomic、network parsing |
modules/utils-adaptor-std |
標準ライブラリ向け utility adaptor |
modules/actor-core-kernel |
no_std の untyped actor kernel: actor ref、system、dispatch、routing、serialization、pattern、lifecycle |
modules/actor-core-typed |
no_std の typed actor facade、DSL、receptionist、pub-sub、delivery、typed event stream、typed system API |
modules/actor-adaptor-std |
Std/Tokio actor binding、executor、tick driver、time、event、pattern、test-support helper |
modules/persistence-core-kernel |
Event sourcing、journal、snapshot、persistent actor、persistent FSM、durable state、persistence extension |
modules/persistence-core-typed |
typed actor 向け persistence effector API、snapshot criteria、retention criteria |
modules/remote-core |
no_std の remote address、association、envelope、provider、transport port、watcher、wire、failure-detector state machine |
modules/remote-adaptor-std |
Std remote extension installer、provider、Tokio TCP transport、I/O worker |
modules/cluster-core |
Cluster membership、identity、placement、pub-sub、grain、failure detection、topology、metrics、routing |
modules/cluster-adaptor-std |
Std cluster API、local provider wrapping、Tokio gossip transport、pub-sub delivery、optional AWS ECS provider |
modules/stream-core-kernel |
no_std の stream DSL、stage、materialization contract、graph shape、stream ref、queue、kill switch、supervision |
modules/stream-core-actor-typed |
stream DSL 向け typed actor integration |
modules/stream-adaptor-std |
Std stream I/O と materializer adaptor |
showcases/std |
ホスト環境向けの実行可能 example |
tests/e2e |
クロスクレート end-to-end test |
lints/ |
プロジェクト構造と Rust 規約のためのカスタム dylint ルール |
openspec/ |
仕様駆動設計 artifact、active change、accepted spec |
- API ドキュメント: docs.rs/fraktor-rs
- Showcase index:
showcases/std/README.md - リポジトリルール: AGENTS.md,
.agents/rules/project.md - OpenSpec 設定:
openspec/config.yaml - Lock-free design note:
docs/guides/lock_free_design.md - 現在の gap report:
- 参照実装:
- Issues: GitHub Issues
- リポジトリ知識ベース: DeepWiki
- コード変更前に AGENTS.md と
.agents/rules/配下の scoped rule を読んでください - 振る舞いに影響する変更では OpenSpec を使い、OpenSpec コマンドは
mise exec -- openspec ...経由で実行してください *-coreクレートはno_stdを維持し、ホスト依存の runtime、network、time、Tokio 関連は*-adaptor-stdクレートに配置してください- 実行可能 example は
modules/**/examplesではなくshowcases/stdに置いてください - 開発中は対象を絞ったチェックを実行し、PR 前には
./scripts/ci-check.sh ai allを実行してください CHANGELOG.mdは GitHub Actions で生成されるため、手動編集しないでください
Apache-2.0 / MIT のデュアルライセンスです。LICENSE-APACHE と LICENSE-MIT を参照してください。