xur-runtime 0.1.10

Values, native-function registry and facet conversions for the Xur language
Documentation
//! Rust types for the built-in attributes parsed by the registry attribute
//! system (see `registry::attribute`). Each is registered with
//! `register_attribute::<T>(name, kind)` and read back by a consumer via
//! `resolutions.attribute::<T>(target, name)`.

use facet::Facet;

/// `#[jit(always | never | eager)]` — a function's JIT policy. The attribute
/// being absent means interpret (the default), so there is no `Interpret`
/// variant.
#[derive(Facet, Debug, Clone, Copy, PartialEq, Eq)]
#[repr(u8)]
pub enum JitLevel {
    /// Compile on first call, then run native code.
    Always,
    /// Never compile; always interpret.
    Never,
    /// Compile before the function is first called.
    Eager,
}