Skip to content

Releases: tqwewe/kameo

v0.14.0

16 Jan 17:42
ba1c7b7
Compare
Choose a tag to compare

Kameo 0.14 is here, bringing some nice new features, two new contributors, and two new generous sponsors.

A huge thank you to Huly Labs and Caido Community for supporting Kameo's development! 💖

And thanks to @meowjesty and @Kamil729 for their contributions!

New Features

Deadlock Warnings

Any ask or tell requests which could result in a deadlock will now emit tracing warnings.

An example includes sending a tell request with .send instead of .try_send, which may result in a deadlock if the mailbox is full.
Doing so will print a warning:

At src/lib.rs:277, An actor is sending a blocking tell request to itself using a bounded mailbox, which may lead to a deadlock.

A nice feature of these warnings is that they show exactly which line of code the issue comes from, making it easily resolvable.

Note that these warnings are only present in debug builds.

Remote Actor Links

Actors can now be linked together remotely! This means if one actor dies, the other will be notified.

This can be achieved with the new methods:

  • ActorRef::link_remote
  • ActorRef::unlink_remote
  • RemoteActorRef::link_remote
  • RemoteActorRef::unlink_remote

Additionally, if a peer gets disconnected, any actors with links to that peer will be notified with ActorStopReason::PeerDisconnected,
making the system robust even if a peer crashes or is disconnected.

ActorRef's blocking_link and blocking_unlink

ActorRef now supports linking and unlinking actors with the new blocking_link and blocking_unlink methods for syncrhonous contexts.

Local Actor Registry

Previously actors could be registered and looked up with kameo's remote feature. But now, this feature is supported for non-remote kameo environments,
providing an easy way to register and lookup actors.

let actor_ref = kameo::spawn(MyActor); 
actor_ref.register("my awesome actor")?; 

let other_actor_ref = ActorRef::<MyActor>::lookup("my awesome actor")?.unwrap(); 
assert_eq!(actor_ref.id(), other_actor_ref.id()); 

Full Control Over Actor Swarm

Configuring or having any sort of control over the underlying libp2p swarm was impossible with kameo.
But now, its very easy and flexible, allowing any kind of custom behaviour to be implemented.

Some new methods when bootstrapping include:

  • ActorSwarm::bootstrap_with_behaviour for providing a custom behaviour.
  • ActorSwarm::bootstrap_with_swarm for providing a custom swarm.
  • ActorSwarm::bootstrap_manual for extremely manual processing of the actor swarm. (see examples/manual_swarm.rs)

Added

  • BREAKING: Add support for manual swarm operations (#111)
  • BREAKING: Add local actor registry for non-remote environments (#114)
  • BREAKING: Add support for remote actor links (#116)
  • Add warnings for potential deadlocks (#87)
  • Implement infallible reply for std::path types (#96)
  • Add blocking_link and blocking_unlink methods to ActorRef (#115)

Changed

  • BREAKING: Use kameo::error::Infallible in Reply derive macro instead of ()
  • BREAKING: Modularize features and improve conditional compilation (#112)

Removed

  • BREAKING: Remove actor state from PreparedActor (#99)
  • BREAKING: Remove deprecated link_child, unlink_child, link_together, and unlink_together methods </>
  • Remove mailbox capacity warning on unbounded mailbox tell requests </>
  • Remove itertools dependency and replace repeat_n with std::iter::repeat </>

Fixed

  • Fix clippy lints and add to CI

Documentation

  • Add Caido Community sponsor to README.md </>
  • Remote stars badge from README.md </>
  • Add huly labs sponsor to README.md </>

Misc

  • Fix release script with current release notes </>
  • Add changelog links for new versions </>
  • Remove flake.nix and flake.lock </>

See the full CHANGELOG.md

v0.13.0

15 Nov 14:07
421272e
Compare
Choose a tag to compare

Added

  • Impl IntoFuture for requests (#72)
  • Add public BoxReplySender type alias (#70)
  • Add support for preparing an actor and running it outside a spawned task (#69)
  • Add Context::reply shorthand method </>

Changed

  • BREAKING: Relax request impls to be generic to any mailbox (#71)
  • BREAKING: Use owned actor ref in spawn_with function (#68)

Fixed

  • BREAKING: Startup deadlock on small bounded mailboxes (#84)
  • Tokio_unstable compile error in spawn </>
  • Request downcasting and added tests (#85)

Documentation

  • Remove reverences to deprecated linking methods (#79)

Misc

  • Add empty message to git tag release script </>
  • Remove msrv from Cargo.toml (#82)

See the full CHANGELOG.md

v0.12.2

17 Oct 06:45
4a551c3
Compare
Choose a tag to compare

Added

  • Add spawn_link and link/unlink functions (#67)

Documentation

  • Update README with improved content </>

Misc

  • Add release script </>

See the full CHANGELOG.md

v0.12.1

15 Oct 10:50
c05f4de
Compare
Choose a tag to compare

Added

  • Add ForwardMessageSendSync request trait (#65)

Fixed

  • Actor lifecycle error handling when on_start errors </>

Documentation

  • Add FAQ to book about reasons for actors stopping </>

Misc

  • Ignore alpha and beta tags in cliff.toml </>

See the full CHANGELOG.md

v0.12.0

11 Oct 11:48
aa3190f
Compare
Choose a tag to compare

Added

  • Add ActorRef::wait_startup method (#63)

Changed

  • BREAKING: Make Links private (#57)
  • BREAKING: Move actor pool and pubsub to their own modules (#56)
  • BREAKING: Move ActorIDFromBytesError to error module </>
  • BREAKING: Move remote actor functionality behind remote feature (#60) </>
  • ActorID and improve documentation (#48)

Documentation

  • Remove benchmark from README.md </>
  • Add contributors badge to README.md </>
  • Add Discord badge to README.md </>
  • Add book badge to README.md </>
  • Add getting help section to README.md </>
  • Improve README with use cases, additional resources, and clearer structure </>
  • Add support section to README.md </>
  • Add Distributed Actor Communication section to README.md </>
  • Improve code docs for remote module </>
  • Add in-depth distributed actors information to kameo book (#51)
  • Update heading levels in book </>
  • Improve code docs and examples with all tests passing (#54)
  • Add FAQ to book (#59)

Misc

  • Add links to README badges (#47)
  • Add gtag to kameo book (#52)
  • Add Github CI </>
  • Remote beta and nightly toolchains from CI </>
  • Create CODE_OF_CONDUCT.md </>
  • Add CONTRIBUTING.md </>
  • Add github issue templates </>
  • Move banner.png into docs directory </>
  • Add .envrc to .gitignore </>
  • Add pr detection to git cliff contributors </>

See the full CHANGELOG.md

v0.12.0-alpha.1

09 Oct 16:11
6b707ae
Compare
Choose a tag to compare
v0.12.0-alpha.1 Pre-release
Pre-release

[0.12.0-alpha.1] - 2024-10-09

Changed

  • BREAKING: Make Links private (#57)
  • BREAKING: Move actor pool and pubsub to their own modules (#56)
  • BREAKING: Move ActorIDFromBytesError to error module </>
  • BREAKING: Move remote actor functionality behind remote feature (#60) </>
  • ActorID and improve documentation (#48)

Documentation

  • Remove benchmark from README.md </>
  • Add contributors badge to README.md </>
  • Add Discord badge to README.md </>
  • Add book badge to README.md </>
  • Add getting help section to README.md </>
  • Improve README with use cases, additional resources, and clearer structure </>
  • Add support section to README.md </>
  • Add Distributed Actor Communication section to README.md </>
  • Improve code docs for remote module </>
  • Add in-depth distributed actors information to kameo book (#51)
  • Update heading levels in book </>
  • Improve code docs and examples with all tests passing (#54)
  • Add FAQ to book (#59)

Misc

  • Add links to README badges (#47)
  • Add gtag to kameo book (#52)
  • Add Github CI </>
  • Remote beta and nightly toolchains from CI </>
  • Create CODE_OF_CONDUCT.md </>
  • Add CONTRIBUTING.md </>
  • Add github issue templates </>
  • Move banner.png into docs directory </>
  • Add .envrc to .gitignore </>
  • Add pr detection to git cliff contributors </>

See the full CHANGELOG.md

v0.11.0

29 Sep 12:07
78bc260
Compare
Choose a tag to compare

Added

  • BREAKING: Add lifetime to requests to avoid mailbox cloning </>
  • Use interned peer ids for improved performance (#43)
  • Return stream from join handle in attach_stream </>

Changed

  • BREAKING: Detach stream when actor stops </>
  • BREAKING: Use multiaddr and add SwarmFuture (#44) </>

Fixed

  • attach_stream panicking when actor is stopped </>

Documentation

  • Add book explaining core concepts (#40)
  • Add missing examples from actors page </>
  • Fix indentation for request features </>
  • Add note about Result::Err in the reply trait </>
  • Add note about SendError::HandlerError in replies </>
  • Add icons and links to core concepts overview page </>
  • Fix formatting in book </>
  • Add icons to introduction headings </>

Misc

  • Fix path to README in Cargo.toml </>
  • Add obsidian related items to .gitignore </>
  • Remove unused mailbox modules </>
  • Update git cliff configuration </>

See the full CHANGELOG.md

v0.10.0

09 Sep 04:26
11e7b45
Compare
Choose a tag to compare

Added

  • BREAKING: Add request traits (#39)
  • Add delayed_send for unbounded actors </>
  • Add remote actor support (#35)
  • Add actor attribute to Actor derive macro </>
  • Make actor swarm listen address optional </>
  • Use macro to clean request trait impls for MaybeRequestTimeout </>

Removed

  • BREAKING: Remove queries (#36)

Fixed

  • Call on_panic when actor panics during startup </>

Documentation

  • Update README.md </>
  • Improve documentation for async messages </>
  • Add missing mut from reply_sender example </>
  • Add MessageSend import in code examples </>

Misc

  • Fix path to README in Cargo.toml files </>
  • Move kameo crate to root directory </>
  • Add banner image </>
  • Create dependabot.yml </>
  • Remote PR number suffix from changelog generation </>

See the full CHANGELOG.md

v0.9.0

25 Jun 06:42
1ca41a9
Compare
Choose a tag to compare

Added

  • BREAKING: Add support for bounded/unbounded mailboxes (#29) #29
  • Add Send + 'static bounds to Reply trait </>
  • Add pubsub actor (#31) </>
  • Add support for async pool factory functions (#33) #33
  • Add async spawn_with function (#34) #34

Changed

  • BREAKING: Return SendError from send methods allowing replies to be received blocking (#27) #27

Fixed

  • Buffered messages not being applied correctly (#32) #32

Misc

  • Update CHANGELOG.md </>
  • Move crates out of nested crates dir </>

See the full CHANGELOG.md

v0.8.1

24 May 10:00
f5a8f52
Compare
Choose a tag to compare

Added

  • Add BlockingMessage for blocking actor code (#26) #26

See the full CHANGELOG.md