sharify
Back Rust types with shared memory and send them cheaply between processes.
For example
use SharedMut;
use ;
// Create a slice backed by shared memory.
let mut shared_slice: = new?;
// Write some data to it.
for in
successors
.zip
// The shared slice can be sent between processes cheaply without copying the data. What is shown here for threads works equally well for processes, e.g. using the ipc_channel crate.
let = ;
let handle = spawn;
tx.send?;
handle.join.unwrap;
See the docs for details on how to do this for your own types. Requires at least Rust 1.51.0
due to the use of const generics.