add process module
This commit is contained in:
parent
ebf3c07e79
commit
bc8818e695
6 changed files with 3664 additions and 5 deletions
|
@ -12,6 +12,8 @@ pub mod mocks;
|
|||
pub mod tauri;
|
||||
#[cfg(feature = "window")]
|
||||
pub mod window;
|
||||
#[cfg(feature = "process")]
|
||||
pub mod process;
|
||||
|
||||
#[derive(Debug, thiserror::Error)]
|
||||
pub enum Error {
|
||||
|
|
18
src/process.rs
Normal file
18
src/process.rs
Normal file
|
@ -0,0 +1,18 @@
|
|||
pub fn exit(exit_code: u32) -> ! {
|
||||
inner::exit(exit_code);
|
||||
unreachable!()
|
||||
}
|
||||
|
||||
pub fn relaunch() {
|
||||
inner::relaunch();
|
||||
}
|
||||
|
||||
mod inner {
|
||||
use wasm_bindgen::prelude::wasm_bindgen;
|
||||
|
||||
#[wasm_bindgen(module = "/dist/process.js")]
|
||||
extern "C" {
|
||||
pub fn exit(exitCode: u32);
|
||||
pub fn relaunch();
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue