Releases: sitano/maelstrom-rust-node
Releases · sitano/maelstrom-rust-node
v0.1.6 - minors: fix broadcast example and internal unwrap() calls
v0.1.5, call+async call, runtime.rpc, into s
let msg = self.runtime.call(ctx, self.typ, req).await?;
let data = msg.body.as_obj::<Message<T>>()?;
or
r0.send_async(n, msg)
v0.1.4, async send, ::rpc, g-set workload
bump version to v0.1.4, async send, ::rpc, g-set workload
lin/seq/tso/lww kv api
Ok(Request::Cas { key, from, to, put }) => {
let (ctx, _handler) = Context::new();
self.s.cas(ctx, key.to_string(), from, to, put).await?;
return runtime.reply(req, Request::CasOk {}).await;
}
Minor API refinement
like
let mut msg = req.body.as_obj::<BroadcastRequest>()?;
if !runtime.is_from_cluster(&req.src) {
for node in runtime.neighbours() {
let _ = Runtime::rpc(runtime.clone(), node.clone(), msg.clone())
.await? // Result<RPCResult>
.await?; // Result<Message>
}
}
RPC() + result + context support
v0.1.1 bump v0.1.1, rpc support