alef 0.23.44

Opinionated polyglot binding generator for Rust libraries
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
fn nodecontext_to_rb_hash(
    ctx: &{{ context_type_path }},
) -> magnus::RHash {
    let ruby = unsafe { magnus::Ruby::get_unchecked() };
    let h = ruby.hash_new();
{{ context_field_lines }}
    h
}

pub struct {{ struct_name }} {
    rb_obj: magnus::Value,
}

impl std::fmt::Debug for {{ struct_name }} {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        write!(f, "{{ struct_name }}")
    }
}