Add async host functions

This commit is contained in:
Isaac Clayton 2022-06-13 16:06:39 +02:00
parent a5a0abb895
commit 4565f1a976
6 changed files with 96 additions and 91 deletions

View file

@ -61,3 +61,11 @@ pub fn imports(x: u32) -> u32 {
assert_eq!(x, b);
a + b // should be 7 + x
}
#[import]
fn import_half(a: u32) -> u32;
#[export]
pub fn half_async(a: u32) -> u32 {
import_half(a)
}