Decaf Rust examples
| .cargo | ||
| compat | ||
| examples/minigrep | ||
| .gitignore | ||
| .nvim.lua | ||
| Cargo.lock | ||
| Cargo.toml | ||
| README.md | ||
Example programs for decaf-rust
Examples are in the examples/ folder.
- They are setup to use the custom no mutable references compiler using a workspace level .cargo/config.toml file.
- In each individual example, there is a build.rs file that injects an env var only when compiling the sources for the current crate. This env var turns on no_mut_refs in our custom compiler. This way, it's possible to import dependencies without failing.
IDE support
- LazyVim: A workspace level .nvim.lua file is added which sets up the custom no mutable references compiler for IDE errors and suggestions.