Checkpoint
This commit is contained in:
parent
92c4552146
commit
37e04320aa
5 changed files with 60 additions and 9 deletions
|
@ -69,3 +69,15 @@ fn import_half(a: u32) -> u32;
|
|||
pub fn half_async(a: u32) -> u32 {
|
||||
import_half(a)
|
||||
}
|
||||
|
||||
#[import]
|
||||
fn command_async(command: String) -> Option<Vec<u8>>;
|
||||
|
||||
#[export]
|
||||
pub fn echo_async(message: String) -> String {
|
||||
let command = dbg!(format!("echo {}", message));
|
||||
let result = command_async(command);
|
||||
dbg!(&result);
|
||||
let result = result.expect("Could not run command");
|
||||
String::from_utf8_lossy(&result).to_string()
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue