winch: Introduce winch-environ (#6017)

This commit introduces the `winch-environ` crate. This crate's responsibility is
to provide a shared implementatation of the `winch_codegen::FuncEnv` trait,
which is Winch's function compilation environment, used to resolve module and
runtime specific information needed by the code generation, such as resolving
all the details about a callee in a WebAssembly module, or resolving specific
information from the `VMContext`.

As of this change, the implementation only includes the necessary pieces to
resolve a function callee in a WebAssembly module. The idea is to evolve the
`winch_codegen::FuncEnv` trait as we evolve Winch's code generation.
This commit is contained in:
Saúl Cabrera
2023-03-14 15:59:15 -04:00
committed by GitHub
parent e4d9bb7c5a
commit 80bfb35072
12 changed files with 119 additions and 29 deletions

View File

@@ -101,7 +101,8 @@ members = [
"examples/tokio/wasm",
"fuzz",
"winch",
"winch/codegen"
"winch/codegen",
"winch/environ"
]
exclude = [
'crates/wasi-common/WASI/tools/witx-cli',
@@ -163,6 +164,7 @@ cranelift-bforest = { path = "cranelift/bforest", version = "0.95.0" }
cranelift = { path = "cranelift/umbrella", version = "0.95.0" }
winch-codegen = { path = "winch/codegen", version = "=0.6.0" }
winch-environ = { path = "winch/environ", version = "=0.6.0" }
winch-filetests = { path = "winch/filetests" }
winch-test-macros = { path = "winch/test-macros" }