310: fix(llvm-lint) Clean up various warnings r=Hywan a=Hywan
These patches remove various warnings raised by `rustc`.
Only 2 warnings remain.
Co-authored-by: Ivan Enderlin <ivan.enderlin@hoa-project.net>
Co-authored-by: Mackenzie Clark <mackenzie.a.z.c@gmail.com>
309: fix(llvm-backend) Remove an `example.rs` file. r=lachlansneff a=Hywan
I think this file is useless?
Co-authored-by: Ivan Enderlin <ivan.enderlin@hoa-project.net>
Co-authored-by: Mackenzie Clark <mackenzie.a.z.c@gmail.com>
314: add more stubs for pthreading, exceptions, and some invokes r=MarkMcCaskey a=MarkMcCaskey
resolves#308
Adds stubs for the WASM file submitted in the issue; `_llvm_eh_typeid_for` may be able to be properly implemented now, the pthread and cxa ones will require much larger changes
Co-authored-by: Mark McCaskey <mark@wasmer.io>
311: doc(lib) Add basic `README.md` r=Hywan a=Hywan
This patch adds very basic `README.md`. They must obviously be completed, but it's better than nothing!
Co-authored-by: Ivan Enderlin <ivan.enderlin@hoa-project.net>
312: feat(runtime-c-api) Split the big `lib.rs` file into modules r=Hywan a=Hywan
This PR splits the `lib.rs` file into smaller modules.
Proof everything is OK:
1. `wasmer.h` and `wasmer.hh` are not different,
2. Tests are still green,
3. `rustc` is polite.
Bonus: I removed the last couple of warnings.
Next step: Add more documentations.
Co-authored-by: Ivan Enderlin <ivan.enderlin@hoa-project.net>
268: add experimental virtual filesystem r=lachlansneff a=xmclark
This PR introduces some changes to the runtime and adds a new feature: virtual file system.
In the future, we may want to bundle data with our wasm apps. That data can be made available to apps in a virtual filesystem by the wasmer runtime. To do this:
- wasmer must understand custom section data
- wasmer must re-wire emscripten calls to access a virtual file system
- these features are experimental and should be guarded by a feature flag (`--features vfs`)
~This PR adds support for the `read` syscall. ~
Just kidding, this PR does a lot more. Enough syscalls were re-implemented that a code reorg was warranted.
Additions below ⬇️
Several new modules live under and around the `syscalls` module. These features are only supported on linux, but can be expanded to windows.
There are effectively two implementations: one for VFS and one for the host FS. In the future, we will have more tight control over access to the host, but this will do for now. The `select` function was also extracted into a new module as the complexity increased significantly.
`select`should be refactored in the future to use a runtime like tokio, but that will need to wait.
The introduction of the libsodium dependency introduced some stumbling blocks, so I forked the zbox project and added a new build step. See it [here](https://github.com/wasmerio/zbox/blob/bundle-libsodium/build.rs). This will build libsodium at `cargo build` time and will automatically configure the environment. This will help with adoption and it is something we may be able to give back to zbox.
Additional changes:
After review, this PR is just a bit too large. We will implement the emscripten changes in another PR. This will help accelerate the work on WASI.
Co-authored-by: Mackenzie Clark <mackenzie.a.z.c@gmail.com>