feat(defs): nested modules, single file
This commit is contained in:
6256
examples/definitions/.rhai/all_in_one.d.rhai
Normal file
6256
examples/definitions/.rhai/all_in_one.d.rhai
Normal file
File diff suppressed because it is too large
Load Diff
@@ -32,10 +32,17 @@ fn main() -> Result<(), Box<EvalAltResult>> {
|
||||
"hello_there = general_kenobi::hello_there(4 minus 2);",
|
||||
)?;
|
||||
|
||||
// Generate definitions for the contents of the engine and the scope.
|
||||
engine
|
||||
.definitions_with_scope(&scope)
|
||||
.write_to_dir("examples/definitions/.rhai/definitions")
|
||||
.unwrap();
|
||||
|
||||
// Alternatively we can write all of the above to a single file.
|
||||
engine
|
||||
.definitions_with_scope(&scope)
|
||||
.write_to_file("examples/definitions/.rhai/all_in_one.d.rhai")
|
||||
.unwrap();
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
Reference in New Issue
Block a user