Wasmtime documentation says stable is the supported rustc version, and that's
what we test with CI, so the badge should reflect that.
Wasmtime doesn't even build with 1.37 any longer anyway.
* This PR is against a branch called `main`
* Internally all docs/CI/etc is updated
* The default branch of the repo is now `main`
* All active PRs have been updated to retarget `main`
Closes#1914
Update the documentation for the merger, and also for various changes in
Cranelift. Remove some old obsolete documentation, and convert the remaining
Sphinx files to Markdown. Some of the remaining content is still out of
date, but this is a step forward.
* Spice up the project README, fill out more docs
This is an attempt to spruce up wasmtime's README.md file as well as
fill out more of the missing documentation in the `docs/` folder.
There's still a long way to go but I hoped here to mostly move around
existing information and add new information. As always happy to have
feedback!
* Tweak CLI wording
* Remove no-longer relevant clause
* Update sandboxing docs
* Handle comments
* Update the top-level README.md and embedding documentation.
wasmtime-api is now the primary external API crate, so recommend that
instead of wasmtime-jit.
Also, enable wasmtime-api's C API by default, so that it shows up on
docs.rs, and to make it easier to use.
And, add basic embedding documentation and link to it from the
README.md. Credit to @yurydelendik for the content.
* Use the new wasm-c-api URL.
* Don't pass --features wasm-c-api, as it is now on by default.
* Update the README.md.
Feature the wasmtime.dev website, update WASI content.
With Lightbeam moving into the Wasmtime repo, it's no longer necessary
to use git submodules to build Wasmtime.
* Remove cmake/bindgen/llvm from wasmtime-runtime
This commit removes the cmake/bindgen dependency (which removes the need
for `llvm-config`) from the `wasmtime-runtime` crate. The C++ code is
instead compiled with the `cc` crate (it's just one file anyway) and the
interface is handwritten since it's quite small anyway.
Some other changes are:
* The `TrapContext` type in C++ was removed since it was unused, and it
was moved to Rust with a `Cell` on each field.
* Functions between Rust/C++ now return `int` instead of `bool` to make
them a bit more FFI compatible portably.
* The `jmp_buf` type has a workaround that will be fixed in the next commit.
* Move setjmp/longjmp to C++
This commit moves the definition of setjmp and longjmp into C++. This is
primarily done because it's [debatable whether it's possible to call
`setjmp` from Rust][rfc]. The semantics of `setjmp` are that it returns
twice but LLVM doesn't actually know about this because rustc isn't
telling LLVM this information, so it's unclear whether it can ever be
safe.
Additionally this removes the need for Rust code to know the definition
of `jmp_buf` which is a pretty hairy type to define in Rust across
platforms.
The solution in this commit is to move all setjmp/longjmp code to C++,
and that way we should be able to guarantee that jumps over wasm JIT
code should always go from C++ to C++, removing Rust from the equation
for now from needing to get any fiddly bits working across platforms.
This should overall help it be a bit more portable and also means Rust
doesn't have to know about `jmp_buf` as a type.
The previous `Vec` of `jmp_buf` is now replaced with one thread-local
pointer where previous values are stored on the stack and restored when
the function returns. This is intended to be functionally the same as
the previous implementation.
[rfc]: https://github.com/rust-lang/rfcs/issues/2625
* rustfmt
* Use volatile loads/stores
* Remove mention of cmake from README
Currently, it's necessary to do this in order to obtain a lightbeam
checkout, in order to build wasmtime.
I'm very interested in learning about better ways to solve this problem.