Skip to content

Commit 0e5b24a

Browse files
committed
Plugin: Inspect component metadata & Add version to wit file
1 parent 3501320 commit 0e5b24a

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

Diff for: application/apps/indexer/wasm_plugin/host/src/wasm_parser.rs

+10-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use std::{collections::VecDeque, path::Path, usize};
1+
use std::{collections::VecDeque, path::Path};
22

33
use parsers::Parser;
44
use wasmtime::{
@@ -130,6 +130,15 @@ impl WasmParser {
130130

131131
let component = Component::from_file(&engine, wasm_path)?;
132132

133+
let component_types = component.component_type();
134+
135+
println!("Printing component exports info:");
136+
for export_infos in component_types.exports(&engine) {
137+
dbg!(export_infos);
138+
}
139+
140+
println!("----------------------------------------");
141+
133142
let mut linker = Linker::new(&engine);
134143
wasmtime_wasi::add_to_linker_async(&mut linker)?;
135144

Diff for: application/apps/indexer/wasm_plugin/host/wit/indexer.wit

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package host:indexer;
1+
package host:indexer@0.1.0;
22

33
// *** PARSER ***
44
// Types definitions and methods provided be the host.

0 commit comments

Comments
 (0)