Providing the way to express wasm(time) types/signatures in Rust code#364
Providing the way to express wasm(time) types/signatures in Rust code#364yurydelendik wants to merge 6 commits intobytecodealliance:masterfrom
Conversation
|
Docs: will generate/create a function with wasmtime-compatible ABI that looks like, and converts parameters to wasm-friendly types: The func1_desc will have TODO:
Also, produces: And similar to function the TODO:
|
ff231a9 to
20d66de
Compare
|
hello2.rs and hello3.rs expanded https://gist.github.com/yurydelendik/2c1bd0fa76642712203f9ece3680a104 TODO:
|
The vmctx field is needed when |
|
added hello4.rs with annotated |
3e08f02 to
0ea52bb
Compare
0ea52bb to
8f7ce5a
Compare
|
I filed a PR to your PR branch 😄 It adds basic support for a visibility modifier: yurydelendik#1 |
First, this fixes a typo where the hardcoded `Inherited` visiblity wasn't properly set due to a variable name mixup. Second, this adds support for a visibility attribute to the `wrap_impl` macro. I tested the _pub_ modifier, only manually, all others are completely untested.
|
The zero shims PR addresses the same issue. |
The problem: the have multiple ways to express signature metadata needed by wasmtime attached to a Rust function. There are several ways to define WASI interface in wasi-common and other project. This patch will try to describe and combine all macros that are needed to connect a native Rust function with its wasmtime
cranelift_codegen::ir::Signature. (If wrapper/proxy exists, a native function arguments are expected to be converted automatically to correspondingcranelift_codegen::ir::Type)TODOs: