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.
469: Update wasmparser 0.29.2 -> 0.30.0 r=MarkMcCaskey a=repi
Updated to the latest version of wasmparser
Co-authored-by: Johan Andersson <repi@repi.se>
467: feat(runtime-c-api) `wasmer_instantiate` raises the source error r=syrusakbary a=Hywan
Instead of returning only “error instanting”, `wasmer_instantiate` can
return the real error message.
Co-authored-by: Ivan Enderlin <ivan.enderlin@hoa-project.net>
Co-authored-by: Syrus Akbary <me@syrusakbary.com>
463: Prevent parent directory from being opened without being preopened wasi r=MarkMcCaskey a=MarkMcCaskey
resolves #462
Because the logic of opening a directory and traversing the tree are separate, we allowed one level of `..` to be opened beyond what was preopened
The diff on github isn't clear, but this adds an if and then puts the previous logic in an else block
Co-authored-by: Mark McCaskey <mark@wasmer.io>
461: fix(runtime-c-api) Prevent negative lengths in various places r=Hywan a=Hywan
This PR prevents receiving negative lengths in various places in the code.
Co-authored-by: Ivan Enderlin <ivan.enderlin@hoa-project.net>
447: add trace macro for more verbose debug statements r=MarkMcCaskey a=MarkMcCaskey
The next step is to implement these in terms of `log`
Co-authored-by: Mark McCaskey <mark@wasmer.io>
Co-authored-by: Mark McCaskey <markmccaskey@users.noreply.github.com>