Hi,

On Mon, Sep 29, 2014 at 11:01 PM, Wink Saville <w...@saville.com> wrote:
> Nanomsg looks interesting and I'll take a closer look. But I'm interested in
> a pure rust implementation of async messaging because I'd like to create an
> embedded OS using rust and not use C if possible.
>

I think even if there will be nanomsg implementation in pure rust,
that would probably require rust stdlib, which is usually not used for
embedded purposes, right?

> I been thinking about the problem and one of the questions I have is how to
> transfer ownership of a pointer from one entity to another. Not borrow but
> actually transfer ownership. So if I "allocated" a Message in one entity
> then send it to another I want the receiver to "free" the Message.
>


> Does the rust ownership model allow ownership to be transferred?
>

Sure, you can just send Vec of bytes or any other rust object though
the channel (just like almost any rust object). And semantics is just
like you described. You can also use Arc<Vec<u8>> that allows to use
that message in several places simultaneously (e.g. if you want
publish-subscribe)


-- 
Paul
_______________________________________________
Rust-dev mailing list
Rust-dev@mozilla.org
https://mail.mozilla.org/listinfo/rust-dev

Reply via email to