Use own plugin
This commit is contained in:
parent
3c801ed649
commit
c611966165
@ -1,14 +1,14 @@
|
||||
use extism::*;
|
||||
|
||||
fn main() {
|
||||
let url =
|
||||
Wasm::url("https://github.com/extism/plugins/releases/latest/download/count_vowels.wasm");
|
||||
// let url =
|
||||
// Wasm::url("https://github.com/extism/plugins/releases/latest/download/count_vowels.wasm");
|
||||
let url = Wasm::file("../plugin/target/wasm32-unknown-unknown/debug/plugin.wasm");
|
||||
let manifest = Manifest::new([url]);
|
||||
let mut plugin = Plugin::new(&manifest, [], true).unwrap();
|
||||
let mut plugin = Plugin::new(manifest, [], true).unwrap();
|
||||
|
||||
let res = plugin
|
||||
.call::<&str, &str>("count_vowels", "Hello, world!")
|
||||
.unwrap();
|
||||
println!("{}", res);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user