mirror of
https://github.com/fluencelabs/wasmer
synced 2025-06-29 08:31:32 +00:00
Improved Wasmer Backends documentation
This commit is contained in:
@ -6,6 +6,7 @@ license = "MIT"
|
|||||||
authors = ["The Wasmer Engineering Team <engineering@wasmer.io>"]
|
authors = ["The Wasmer Engineering Team <engineering@wasmer.io>"]
|
||||||
repository = "https://github.com/wasmerio/wasmer"
|
repository = "https://github.com/wasmerio/wasmer"
|
||||||
edition = "2018"
|
edition = "2018"
|
||||||
|
readme = "README.md"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
wasmer-runtime-core = { path = "../runtime-core", version = "0.5.7" }
|
wasmer-runtime-core = { path = "../runtime-core", version = "0.5.7" }
|
||||||
|
@ -28,4 +28,26 @@ Wasmer is a standalone JIT WebAssembly runtime, aiming to be fully
|
|||||||
compatible with Emscripten, Rust and Go. [Learn
|
compatible with Emscripten, Rust and Go. [Learn
|
||||||
more](https://github.com/wasmerio/wasmer).
|
more](https://github.com/wasmerio/wasmer).
|
||||||
|
|
||||||
This crate represents the Cranelift backend.
|
This crate represents the Cranelift backend integration for Wasmer.
|
||||||
|
|
||||||
|
## Usage
|
||||||
|
|
||||||
|
### Usage in Wasmer Standalone
|
||||||
|
|
||||||
|
If you are using the `wasmer` CLI, you can specify the backend with:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
wasmer run program.wasm --backend=cranelift
|
||||||
|
```
|
||||||
|
|
||||||
|
### Usage in Wasmer Embedded
|
||||||
|
|
||||||
|
If you are using Wasmer Embedded, you can specify
|
||||||
|
the Cranelift backend to the [`compile_with` function](https://docs.rs/wasmer-runtime-core/*/wasmer_runtime_core/fn.compile_with.html):
|
||||||
|
|
||||||
|
```rust
|
||||||
|
use wasmer_clif_backend::CraneliftCompiler;
|
||||||
|
|
||||||
|
// ...
|
||||||
|
let module = wasmer_runtime_core::compile_with(&wasm_binary[..], &CraneliftCompiler::new());
|
||||||
|
```
|
||||||
|
@ -3,6 +3,7 @@ name = "wasmer-llvm-backend"
|
|||||||
version = "0.5.7"
|
version = "0.5.7"
|
||||||
authors = ["Lachlan Sneff <lachlan.sneff@gmail.com>"]
|
authors = ["Lachlan Sneff <lachlan.sneff@gmail.com>"]
|
||||||
edition = "2018"
|
edition = "2018"
|
||||||
|
readme = "README.md"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
wasmer-runtime-core = { path = "../runtime-core", version = "0.5.7" }
|
wasmer-runtime-core = { path = "../runtime-core", version = "0.5.7" }
|
||||||
|
@ -28,4 +28,26 @@ Wasmer is a standalone JIT WebAssembly runtime, aiming to be fully
|
|||||||
compatible with Emscripten, Rust and Go. [Learn
|
compatible with Emscripten, Rust and Go. [Learn
|
||||||
more](https://github.com/wasmerio/wasmer).
|
more](https://github.com/wasmerio/wasmer).
|
||||||
|
|
||||||
This crate represents the LLVM backend.
|
This crate represents the LLVM backend integration for Wasmer.
|
||||||
|
|
||||||
|
## Usage
|
||||||
|
|
||||||
|
### Usage in Wasmer Standalone
|
||||||
|
|
||||||
|
If you are using the `wasmer` CLI, you can specify the backend with:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
wasmer run program.wasm --backend=llvm
|
||||||
|
```
|
||||||
|
|
||||||
|
### Usage in Wasmer Embedded
|
||||||
|
|
||||||
|
If you are using Wasmer Embedded, you can specify
|
||||||
|
the LLVM backend to the [`compile_with` function](https://docs.rs/wasmer-runtime-core/*/wasmer_runtime_core/fn.compile_with.html):
|
||||||
|
|
||||||
|
```rust
|
||||||
|
use wasmer_llvm_backend::LLVMCompiler;
|
||||||
|
|
||||||
|
// ...
|
||||||
|
let module = wasmer_runtime_core::compile_with(&wasm_binary[..], &LLVMCompiler::new());
|
||||||
|
```
|
||||||
|
@ -6,6 +6,7 @@ description = "Wasmer runtime single pass compiler backend"
|
|||||||
license = "MIT"
|
license = "MIT"
|
||||||
authors = ["The Wasmer Engineering Team <engineering@wasmer.io>"]
|
authors = ["The Wasmer Engineering Team <engineering@wasmer.io>"]
|
||||||
edition = "2018"
|
edition = "2018"
|
||||||
|
readme = "README.md"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
wasmer-runtime-core = { path = "../runtime-core", version = "0.5.7" }
|
wasmer-runtime-core = { path = "../runtime-core", version = "0.5.7" }
|
||||||
|
@ -28,4 +28,27 @@ Wasmer is a standalone JIT WebAssembly runtime, aiming to be fully
|
|||||||
compatible with Emscripten, Rust and Go. [Learn
|
compatible with Emscripten, Rust and Go. [Learn
|
||||||
more](https://github.com/wasmerio/wasmer).
|
more](https://github.com/wasmerio/wasmer).
|
||||||
|
|
||||||
This crate represents the singlepass backend.
|
|
||||||
|
This crate represents the Singlepass backend integration for Wasmer.
|
||||||
|
|
||||||
|
## Usage
|
||||||
|
|
||||||
|
### Usage in Wasmer Standalone
|
||||||
|
|
||||||
|
If you are using the `wasmer` CLI, you can specify the backend with:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
wasmer run program.wasm --backend=singlepass
|
||||||
|
```
|
||||||
|
|
||||||
|
### Usage in Wasmer Embedded
|
||||||
|
|
||||||
|
If you are using Wasmer Embedded, you can specify
|
||||||
|
the LLVM backend to the [`compile_with` function](https://docs.rs/wasmer-runtime-core/*/wasmer_runtime_core/fn.compile_with.html):
|
||||||
|
|
||||||
|
```rust
|
||||||
|
use wasmer_singlepass_backend::SinglepassCompiler;
|
||||||
|
|
||||||
|
// ...
|
||||||
|
let module = wasmer_runtime_core::compile_with(&wasm_binary[..], &SinglepassCompiler::new());
|
||||||
|
```
|
||||||
|
Reference in New Issue
Block a user