mirror of
https://github.com/uqbar-dao/nectar.git
synced 2024-12-03 03:36:30 +03:00
args working
This commit is contained in:
parent
27ff968fc1
commit
5d74293678
@ -272,11 +272,15 @@ fn handle_run(
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
Request::new()
|
||||
let _ = Request::new()
|
||||
.target(("our", "kernel", "sys", "nectar"))
|
||||
.body(serde_json::to_vec(&kt::KernelCommand::RunProcess(
|
||||
parsed_new_process_id,
|
||||
parsed_new_process_id.clone(),
|
||||
))?)
|
||||
.send_and_await_response(5)??;
|
||||
let _ = Request::new()
|
||||
.target(("our", parsed_new_process_id))
|
||||
.body(args.into_bytes())
|
||||
.send();
|
||||
Ok(())
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
use nectar_process_lib::{await_message, call_init, println, Address, Request};
|
||||
use nectar_process_lib::{await_message, call_init, println, Address, Message, Request};
|
||||
|
||||
wit_bindgen::generate!({
|
||||
path: "wit",
|
||||
@ -12,4 +12,12 @@ call_init!(init);
|
||||
|
||||
fn init(our: Address) {
|
||||
println!("{}: this is a dummy script!", our);
|
||||
|
||||
// TODO will need to package this up into a process lib function that makes it easy
|
||||
let Ok(Message::Request { body, .. }) = await_message() else {
|
||||
println!("got send error, failing out");
|
||||
return;
|
||||
};
|
||||
|
||||
println!("here are the args: {:?}", String::from_utf8(body));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user