mirror of
https://github.com/uqbar-dao/nectar.git
synced 2025-01-01 13:05:00 +03:00
WIP
This commit is contained in:
parent
7f64a06609
commit
bbfeb418bd
@ -17,7 +17,6 @@ cargo-component-bindings = { git = "https://github.com/bytecodealliance/cargo-co
|
||||
serde = {version = "1.0", features = ["derive"] }
|
||||
serde_json = "1.0"
|
||||
wit-bindgen = { version = "0.11.0", default_features = false }
|
||||
uqbarprocesslib = { path = "../../uqbar-process-lib" }
|
||||
|
||||
[lib]
|
||||
crate-type = ["cdylib"]
|
||||
|
@ -14,7 +14,11 @@ struct Component;
|
||||
|
||||
impl Guest for Component {
|
||||
fn init(_: Address) {
|
||||
println!("Don't run this, run the app!");
|
||||
print_to_terminal(0, "don't run this!");
|
||||
|
||||
std::thread::sleep(std::time::Duration::from_millis(3000));
|
||||
|
||||
|
||||
set_on_panic(&OnPanic::None);
|
||||
}
|
||||
}
|
||||
|
@ -123,27 +123,10 @@ impl UqProcessImports for ProcessWasi {
|
||||
// process management:
|
||||
//
|
||||
|
||||
/// todo -> move to kernel logic to enable persistence etc.
|
||||
async fn set_on_panic(&mut self, _on_panic: wit::OnPanic) -> Result<()> {
|
||||
unimplemented!();
|
||||
// let on_panic = match on_panic {
|
||||
// wit::OnPanic::None => t::OnPanic::None,
|
||||
// wit::OnPanic::Restart => t::OnPanic::Restart,
|
||||
// wit::OnPanic::Requests(reqs) => t::OnPanic::Requests(
|
||||
// reqs.into_iter()
|
||||
// .map(|(addr, req, payload)| {
|
||||
// (
|
||||
// de_wit_address(addr),
|
||||
// de_wit_request(req),
|
||||
// de_wit_payload(payload),
|
||||
// )
|
||||
// })
|
||||
// .collect(),
|
||||
// ),
|
||||
// };
|
||||
|
||||
// self.process.metadata.on_panic = on_panic;
|
||||
// Ok(())
|
||||
/// TODO critical: move to kernel logic to enable persistence of choice made here
|
||||
async fn set_on_panic(&mut self, on_panic: wit::OnPanic) -> Result<()> {
|
||||
self.process.metadata.on_panic = de_wit_on_panic(on_panic);
|
||||
Ok(())
|
||||
}
|
||||
|
||||
/// create a message from the *kernel* to the filesystem,
|
||||
|
Loading…
Reference in New Issue
Block a user