2 releases
Uses new Rust 2024
| 0.2.11 | Nov 12, 2025 |
|---|---|
| 0.2.7 | Nov 12, 2025 |
#778 in Concurrency
28KB
71 lines
fraktor-rs
See README.ja.md for the Japanese edition.
fraktor-rs is a specification-driven actor runtime that mirrors the lifecycle, supervision, and remoting patterns of Akka/Pekko and protoactor-go while remaining friendly to both no_std microcontrollers and host targets such as Tokio. The workspace ships a consistent API surface across actor-core (portable runtime), actor-std (host adapters), and utils-* crates, making it possible to deploy the same behaviors from RP2040 boards to Linux servers.
Key Capabilities
- Lifecycle-first ActorSystem –
SystemMessage::{Create,Recreate,Failure}takes priority in the system mailbox to guarantee deterministic supervision and DeathWatch flows. - Pekko-compatible ActorPath –
ActorPathParts,PathSegment, andActorPathFormatterbuildpekko://system@host:port/user/...URIs with guardian injection, UID suffixes, and RFC2396 validation. - Remote authority management –
RemoteAuthorityManagertracksUnresolved → Connected → Quarantinetransitions, defers outbound traffic, and enforces quarantine timeouts sourced fromRemotingConfig. - Observability tooling – EventStream, DeadLetter, and LoggerSubscriber expose low-latency telemetry pipelines that span RTT/UART on embedded boards and tracing subscribers on hosts.
- Typed/Untyped interop –
TypedActorbridges into classic actors viainto_untyped/as_untyped, preserving reply semantics without global sender state. - Toolbox abstraction –
fraktor-utils-coreprovidesRuntimeToolboxprimitives (portable atomics, spinlocks, timers) so higher layers stay allocator-agnostic and interrupt-safe.
Architecture Overview
utils-core --> actor-core --> actor-std
^ ^ ^
| | |
| Remoting & Tokio/host
utility system APIs integration
- utils-core: low-level synchronization, URI parser, timer families, ArcShared replacements.
- actor-core: no_std ActorSystem, actor refs, mailboxes, supervision, actor path registry, remote authority management.
- actor-std: Tokio executors, logging backends, host-only conveniences layered on
actor-core. - utils-std: complements utils-core with std-only helpers when the target allows it.
Getting Started
- Install prerequisites
- Rust nightly toolchain (
rustup toolchain install nightly) cargo-dylint,rustc-dev,llvm-tools-preview(for custom lints)- Optional:
rustup target add thumbv6m-none-eabi thumbv8m.main-none-eabifor embedded builds
- Rust nightly toolchain (
- Clone the repo
git clone [email protected]:j5ik2o/fraktor-rs.git cd fraktor-rs - Run the developer workflow
cargo fmt --check cargo test -p fraktor-utils-core-rs uri_parser cargo test -p fraktor-actor-core-rs actor_path scripts/ci-check.sh all # full lint + dylint + no_std/std/embedded + docs
Repository Layout
| Path | Description |
|---|---|
modules/utils-core |
no_std primitives: portable atomics, RuntimeToolbox, RFC2396 URI parser |
modules/actor-core |
platform-neutral ActorSystem, actor path registry, remote authority manager |
modules/actor-std |
Tokio bindings, host logging/telemetry bridges |
modules/utils-std |
std-only helpers layered on utils-core |
scripts/ |
repeatable CI entry points (lint, dylint, no_std, std, embedded, docs) |
.kiro/ |
OpenSpec-driven requirements/design/tasks plus steering policies |
Specification-Driven Development
Large features follow the OpenSpec flow captured in .kiro/specs/<feature>:
- Requirements → Design → Tasks → Implementation (
/prompts:kiro-*commands) - Steering policies under
.kiro/steering/define coding standards (2018 modules, 1 type per file, rustdoc in English, non-rustdoc in Japanese unless otherwise stated). - Validation is automated via
/prompts:kiro-validate-*to ensure requirements traceability and test coverage before merging.
Roadmap
- Complete ActorSelection resolver enhancements (
/systemguardians,..navigation). - Finalize
RemoteAuthorityManagerquarantine timers and deferred queues. - Implement end-to-end Pekko-compatible remoting transport after the registry/authority layers stabilize.
- Continue enriching docs (
docs/guides) and add bilingual coverage to match README.ja.md.
Contributing
- Fork and create a feature branch.
- Add/extend specifications under
.kiro/specs/before touching code. - Run
scripts/ci-check.sh alllocally; ensure both no_std and std test suites pass. - Submit a PR referencing the relevant spec + tasks.
License
Dual-licensed under Apache-2.0 and MIT. See LICENSE-APACHE and LICENSE-MIT for details.