diff options
Diffstat (limited to 'src/process.rs')
| -rw-r--r-- | src/process.rs | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/process.rs b/src/process.rs new file mode 100644 index 0000000..ed8c542 --- /dev/null +++ b/src/process.rs @@ -0,0 +1,14 @@ +use crate::ScriptContext; + +mod tortuise { + #[link(wasm_import_module = "tortuise")] + unsafe extern "C" { + pub safe fn exit(context: u64) -> !; + } +} + +impl ScriptContext { + pub fn exit(&self) -> ! { + tortuise::exit(self.0) + } +} |
