Skip to content

Commit 6bb130b

Browse files
pass ticket from the cli
1 parent b3e42cc commit 6bb130b

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

extism/host/src/main.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ fn main() -> anyhow::Result<()> {
88
.build()?;
99
let rt = tokio_rt.handle().clone();
1010

11+
let ticket = std::env::args().nth(1).expect("missing ticket");
12+
1113
let iroh = rt.block_on(async {
1214
let iroh_path = iroh_extism_host_functions::default_iroh_extism_data_root().await?;
1315
iroh_extism_host_functions::create_iroh(iroh_path).await
@@ -23,10 +25,10 @@ fn main() -> anyhow::Result<()> {
2325
iroh_extism_host_functions::add_all_host_functions(rt, plugin, iroh).build()?;
2426

2527
let res = plugin
26-
.call::<&str, &str>("print_hai_and_get_ticket", "blobaaa54kekl2oa7yd5ro3u65kynwolq3h2msu65c3jfj44ja23fstmcajcnb2hi4dthixs65ltmuys2mjomrsxe4bonfzg62bonzsxi53pojvs4lydabefsibbyrlqbqfiirdmivybeyaeaqktotuaaaaaaaaaaaaqb7cvoah75ql4x2hvxaxxlgje2d7qy2avizyjb25pd4anc6c5ulvgpth5xq")
28+
.call::<&str, &str>("print_hai_and_get_ticket", &ticket)
2729
.unwrap();
2830

29-
println!("{}", res);
31+
println!("Received iroh data:\n\n{}", res);
3032

3133
Ok(())
3234
}

0 commit comments

Comments
 (0)