Rust is great. Doors are great. Putting them together is not yet great.
The goal of this crate is to expose the illumos Doors API in Rust. Eventually, the unsafe parts of this api should be merged into the "solarish" section of the libc crate. However, I think Rust will allow for some very expressive, safe ways to work with doors, and that is what I would like this crate to focus on in the long term.
```rust /* Server process */
doorfn!(Server() { /* Do some great server stuff */ });
fn main() { let path = "server.door"; match Server::attachto("server.door") { None => panic!("Could not prepare a door on the filesystem"), Some(d) => { let x = time::Duration::from_millis(1000 * 360); thread::sleep(x); } } } ```
```rust
fn Server(data: vec
fn main() { Server::attachto("server.door")?; door::awaitclients(); } ```
and in the client:
rust
fn main() {
let server = File::open("server.door")?.into_door();
server.call()?;
}