Myriam
Local and remote actor model implementation with an API heavily inspired in (but not necessarily equivalent to) Goblins.
// LocalHandle allows for local, type-safe communication
// UntypedHandle tries to do the same, but requests and responses are
// bag of bytes and have to be {de}serialized
let
= .await?;
// create router with a TOR netlayer
let layer =
new_for_service
.await?;
let router_handle = with_netlayer.await?;
// routers handle external access to several attached actors
// we can think of this exposed actor as a capability
// "tor:4ruu43hmgibt5lgg3cvghbrmprotl5m7ts2lral5wnhf5wwkocva@someaddress.onion"
let address = router_handle.attach.await?;
let new_layer =
new_for_service
.await?;
let remote_handle
= new;
// type handle once ^
// use RemoteHandle just like a LocalHandle
let res = remote_handle.send.await?;
// capabilities can be revoked anytime
router_handle.revoke.await?;
sleep;
// ...and thus we can't invoke this one anymore
remote_handle.send.await.unwrap_err;
Check out the examples for a more comprehensive demo.
features
remote (default): support for remote messagingtcp (default): TCP test-only net layertor (default): Tor net layer - requires a running and properly configured Tor router