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