fraktor-rs

Crates.iofraktor-rs
lib.rsfraktor-rs
version0.2.11
created_at2025-11-12 13:52:43.253665+00
updated_at2025-11-12 14:47:09.400914+00
descriptionSpecification-driven actor runtime bridging Akka/Pekko and Proto.Actor semantics across no_std and std targets.
homepagehttps://github.com/j5ik2o/fraktor-rs
repositoryhttps://github.com/j5ik2o/fraktor-rs
max_upload_size
id1929386
size79,534
Junichi Kato (j5ik2o)

documentation

https://docs.rs/fraktor-rs

README

fraktor-rs

CI crates.io docs.rs Renovate dependency status License License tokei

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 ActorSystemSystemMessage::{Create,Recreate,Failure} takes priority in the system mailbox to guarantee deterministic supervision and DeathWatch flows.
  • Pekko-compatible ActorPathActorPathParts, PathSegment, and ActorPathFormatter build pekko://system@host:port/user/... URIs with guardian injection, UID suffixes, and RFC2396 validation.
  • Remote authority managementRemoteAuthorityManager tracks Unresolved → Connected → Quarantine transitions, defers outbound traffic, and enforces quarantine timeouts sourced from RemotingConfig.
  • 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 interopTypedActor bridges into classic actors via into_untyped/as_untyped, preserving reply semantics without global sender state.
  • Toolbox abstractionfraktor-utils-core provides RuntimeToolbox primitives (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

  1. 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-eabi for embedded builds
  2. Clone the repo
    git clone git@github.com:j5ik2o/fraktor-rs.git
    cd fraktor-rs
    
  3. 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>:

  1. RequirementsDesignTasksImplementation (/prompts:kiro-* commands)
  2. Steering policies under .kiro/steering/ define coding standards (2018 modules, 1 type per file, rustdoc in English, non-rustdoc in Japanese unless otherwise stated).
  3. Validation is automated via /prompts:kiro-validate-* to ensure requirements traceability and test coverage before merging.

Roadmap

  • Complete ActorSelection resolver enhancements (/system guardians, .. navigation).
  • Finalize RemoteAuthorityManager quarantine 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

  1. Fork and create a feature branch.
  2. Add/extend specifications under .kiro/specs/ before touching code.
  3. Run scripts/ci-check.sh all locally; ensure both no_std and std test suites pass.
  4. 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.

Commit count: 0

cargo fmt