Hello, i want to implement a plugin system for an app i am building but i don't know exaclty how to do it, currently i am using the wasmtime crate and a simple custom abi (i don't know if it would be better to use wasm-bindgen if i will mainly call wasm code from rust and i am not interested in rust to javascript code)
(I don't really know a lot on how to do this, the implementation was mostly done by ai) I also made (with ai) a macro that i place in front of every function and creates json metadata
{
"name": "fetch_market_price_via_host",
"full_path": "test_wasm_full::PriceLevel::fetch_market_price_via_host",
"callable_type": {
"Method": {
"owner_type": "PriceLevel"
}
},
"params": [
{
"name": "symbol",
"param_type": "String"
}
],
"output_signature": "Number",
"visibility": "Public",
"doc_comment": null,
"is_async": true,
"executor_type": "Wasm"
}
that i use to call the functions (as they don't have a clear signature) but i don't really know the logic in order to make a good plugin system. If i need to use wasm-bindgen (i want to support async and sync as much as possible), and i want to know how to auto create metadata like that (like how to create build.rs file that would create that kind of json metadata for all the functions so my app knows how to call the functions).
any help is welcome!!