gluon_codegen 0.18.3

Code generation macros for the gluon programming language
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use gluon::{self, RootedThread, import::Import};

pub fn new_vm() -> RootedThread {
    let vm = gluon::VmBuilder::new()
        .import_paths(Some(vec!["..".into()]))
        .build();
    let import = vm.get_macros().get("import");
    import
        .as_ref()
        .and_then(|import| import.downcast_ref::<Import>())
        .expect("Import macro")
        .add_path("..");

    vm
}