-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Providing the way to express wasm(time) types/signatures in Rust code #364
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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: