Skip to content

Commit

Permalink
Update test components to use the new export! macro
Browse files Browse the repository at this point in the history
  • Loading branch information
kateinoigakukun committed May 28, 2024
1 parent f204843 commit c89e8c0
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 12 deletions.
5 changes: 2 additions & 3 deletions tests/components/do-everything/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@ extern crate rand;
wit_bindgen::generate!({
path: "../../../wit",
world: "virt-test",
exports: {
world: VirtTestComponent
},
});

struct VirtTestComponent;
Expand All @@ -34,3 +31,5 @@ impl Guest for VirtTestComponent {
unimplemented!();
}
}

export!(VirtTestComponent);
5 changes: 2 additions & 3 deletions tests/components/file-read/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@ use std::{fs, io::ErrorKind};
wit_bindgen::generate!({
path: "../../../wit",
world: "virt-test",
exports: {
world: VirtTestComponent
},
});

struct VirtTestComponent;
Expand Down Expand Up @@ -67,3 +64,5 @@ impl Guest for VirtTestComponent {
unimplemented!();
}
}

export!(VirtTestComponent);
5 changes: 2 additions & 3 deletions tests/components/get-env/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@ use std::env;
wit_bindgen::generate!({
path: "../../../wit",
world: "virt-test",
exports: {
world: VirtTestComponent
},
});

struct VirtTestComponent;
Expand All @@ -21,3 +18,5 @@ impl Guest for VirtTestComponent {
unimplemented!();
}
}

export!(VirtTestComponent);
5 changes: 2 additions & 3 deletions tests/components/stdio/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@ use std::env;
wit_bindgen::generate!({
path: "../../../wit",
world: "virt-test",
exports: {
world: VirtTestComponent
},
});

struct VirtTestComponent;
Expand All @@ -21,3 +18,5 @@ impl Guest for VirtTestComponent {
println!("Hello world");
}
}

export!(VirtTestComponent);

0 comments on commit c89e8c0

Please sign in to comment.