437: Use the new code generator API for Cranelift backend. r=bjfish a=bjfish
Refactor for Cranelift backend to use new code generator API
- [x] Add initial stubbed code generators
- [x] Implement code generators
- [x] Remove old compiler code
- [x] Re-enable warnings
- [x] Cleanup expect/unwrap debug usages
Co-authored-by: Brandon Fish <brandon.j.fish@gmail.com>
Co-authored-by: Brandon Fish <bjfish@users.noreply.github.com>
476: fix bug in wasi::environ_get, fix off by one error in env_size_get r=MarkMcCaskey a=MarkMcCaskey
adds `--env` flag (resolves#475)
fixes other wasi env bugs
adds wasi envvar test
Co-authored-by: Mark McCaskey <mark@wasmer.io>
474: fix(runtime-c-api) Set the install name of the dylib to `@rpath`. r=Hywan a=Hywan
```sh
$ objdump -macho -dylib-id libwasmer_runtime_c_api.dylib
libwasmer_runtime_c_api.dylib:
/Users/distiller/project/target/release/deps/libwasmer_runtime_c_api.dylib
```
we observe that the dylib ID (aka install name) is set to
`/Users/distiller/project/target/release/deps/libwasmer_runtime_c_api.dylib`,
which is valid only in the context of CircleCI.
This patch changes the dylib ID to
`@rpath/libwasmer_runtime_c_api.dylib`, which can be then changed by
the linker option `-rpath` (use `-Wl,-rpath,$value` with the compiler
to send the `-rpath` value to the linker).
This is super useful when dynamically linking libraries against
another language. Having the dylib ID already set to `@rpath` avoid any
build system to call `install_name_tool` manually, which isn't always
possible (e.g. in Go with cgo where we can only pass options to the
compiler with `LDFLAGS`, it's impossible to run any arbitrary command).
Co-authored-by: Ivan Enderlin <ivan.enderlin@hoa-project.net>
```sh
$ objdump -macho -dylib-id libwasmer_runtime_c_api.dylib
libwasmer_runtime_c_api.dylib:
/Users/distiller/project/target/release/deps/libwasmer_runtime_c_api.dylib
```
we observe that the dylib ID (aka install name) is set to
`/Users/distiller/project/target/release/deps/libwasmer_runtime_c_api.dylib`,
which is valid only in the context of CircleCI.
This patch changes the dylib ID to
`@rpath/libwasmer_runtime_c_api.dylib`, which can be then changed by
the linker option `-rpath` (use `-Wl,-rpath,$value` with the compiler
to send the `-rpath` value to the linker).
This is super useful when dynamically linking libraries against
another language.