# rutherford

compile-time permissions system

## overview

`rutherford_macros` provides the `#[capability(...)]` attribute macro, which

- rewrites `std` calls to runtime-safe equivalents
- emits compile-time errors

## example

```rust
use rutherford::capability;

#[capability(fs::write)]
fn main() {
    // works fine
    std::fs::write("test.txt", "hello").unwrap();

    // missing capability `fs::read`
    // hint: add `[#capability(fs::read)]` to the function
    let data = std::fs::read("test.txt").unwrap();
}
```
