hi, I was thinking about having a repository of wasm+component programs which are used by my custom wasm runtime. I want to be able to analyze types which are expected and exposed by .wasm+component binary in order to e.g. reject a submitted program which doesn't comply a certain interface.
Or, for example, if I have a bunch of wasm+component programs in my programs repository with various in/out types, I want to expose them in order to connect inputs and outputs manually, or, generate some inputs. Is there any kind of libraries or built-in functionality related to such use cases? thanks!
the wasmparser
crate can parse and validate a component and its types. it is part of the wasm-tools
repo: https://github.com/bytecodealliance/wasm-tools
thanks, I will try to expand the example! https://github.com/bytecodealliance/wasm-tools/blob/9d3016071952148f1b997ee4e40140e9cd9baa36/crates/wasmparser/examples/simple.rs
Anatolii Smolianinov has marked this topic as resolved.
Last updated: Dec 23 2024 at 14:03 UTC