Files
wasmtime/crates/environ
Peter Huene 29d366db7b Add a compile command to Wasmtime.
This commit adds a `compile` command to the Wasmtime CLI.

The command can be used to Ahead-Of-Time (AOT) compile WebAssembly modules.

With the `all-arch` feature enabled, AOT compilation can be performed for
non-native architectures (i.e. cross-compilation).

The `Module::compile` method has been added to perform AOT compilation.

A few of the CLI flags relating to "on by default" Wasm features have been
changed to be "--disable-XYZ" flags.

A simple example of using the `wasmtime compile` command:

```text
$ wasmtime compile input.wasm
$ wasmtime input.cwasm
```
2021-04-01 19:38:18 -07:00
..
2021-04-01 19:38:18 -07:00
2019-11-08 06:35:40 -08:00
2021-03-25 18:44:31 -05:00
2019-11-08 06:35:40 -08:00
2019-11-08 06:35:40 -08:00

This is the wasmtime-environ crate, which contains the implementations of the ModuleEnvironment and FuncEnvironment traits from cranelift-wasm. They effectively implement an ABI for basic wasm compilation that defines how linear memories are allocated, how indirect calls work, and other details. They can be used for JITing, native object files, or other purposes.