This crate is part of a group that enables using shared-memory files conveniently for persisting state across program restarts. Programs can access this file via language and runtime independent means from the environment. This crate contains a simple binary to configure such an environment, and a library to consume it.
```rust use shm_fd::SharedFd;
// Trust the environment.. let fd = unsafe { SharedFd::fromenv() }?; let memfile = fd.intofile()?;
// Example: utilize the shared memory via memmap2 crate use memmap2::MmapMut; let mapping = unsafe { MmapMut::mapmut(file.asraw_fd()) }?; let memory = &mut mapping[..]; ```