TomBebbington / jit.rs

LibJIT wrapper for Rust
http://tombebbington.github.io/jit.rs/jit/index.html
MIT License
59 stars 11 forks source link

Add macro to auto-implement `Compile` for enums #2

Open TomBebbington opened 9 years ago

TomBebbington commented 9 years ago
#[jit]
pub enum Number {
    Int(i32),
    Float(f64)
}

This should generate a Compile implementation, and some enums from the standard library such as Option and Result should be given Compile implementations.