#wasm-edge #virtual-machine #api-bindings #automotive #cloud #run-time #optimized

wasmedge-sdk

WasmEdge Runtime is a high-performance, extensible, and hardware optimized WebAssembly Virtual Machine for automotive, cloud, AI, and blockchain applications

20 releases (11 breaking)

0.13.2 Nov 15, 2023
0.12.2 Sep 22, 2023
0.10.1 Jul 25, 2023
0.7.1 Nov 25, 2022
0.1.0 May 27, 2022

#44 in WebAssembly

Download history 1069/week @ 2024-01-02 913/week @ 2024-01-09 785/week @ 2024-01-16 541/week @ 2024-01-23 726/week @ 2024-01-30 373/week @ 2024-02-06 419/week @ 2024-02-13 351/week @ 2024-02-20 632/week @ 2024-02-27 432/week @ 2024-03-05 476/week @ 2024-03-12 695/week @ 2024-03-19 523/week @ 2024-03-26 815/week @ 2024-04-02 545/week @ 2024-04-09 687/week @ 2024-04-16

2,649 downloads per month
Used in 6 crates

Apache-2.0

1MB
21K SLoC

WasmEdge Rust SDK

WasmEdge Rust SDK provides idiomatic Rust language bindings for WasmEdge

Notice: This project is still under active development and not guaranteed to have a stable API.

Get Started

This crate depends on the WasmEdge C API. In linux/macOS the crate can download the API at build time by enabling the standalone feature. Otherwise the API needs to be installed in your system first. Please refer to Install and uninstall WasmEdge to install the WasmEdge library. The versioning table below shows the version of the WasmEdge library required by each version of the wasmedge-sdk crate.

wasmedge-sdk WasmEdge lib wasmedge-sys wasmedge-types wasmedge-macro async-wasi
0.13.2 0.13.5 0.17.5 0.4.4 0.6.1 0.1.0
0.13.1 0.13.5 0.17.4 0.4.4 0.6.1 0.1.0
0.13.0 0.13.5 0.17.3 0.4.4 0.6.1 0.1.0
0.12.2 0.13.4 0.17.2 0.4.4 0.6.1 0.1.0
0.12.1 0.13.4 0.17.1 0.4.4 0.6.1 0.1.0
0.12.0 0.13.4 0.17.0 0.4.4 0.6.1 0.1.0
0.11.2 0.13.3 0.16.2 0.4.3 0.6.1 0.1.0
0.11.0 0.13.3 0.16.0 0.4.3 0.6.0 0.0.3
0.10.1 0.13.3 0.15.1 0.4.2 0.5.0 0.0.2
0.10.0 0.13.2 0.15.0 0.4.2 0.5.0 0.0.2
0.9.0 0.13.1 0.14.0 0.4.2 0.4.0 0.0.1
0.9.0 0.13.0 0.14.0 0.4.2 0.4.0 0.0.1
0.8.1 0.12.1 0.13.1 0.4.1 0.3.0 -
0.8.0 0.12.0 0.13.0 0.4.1 0.3.0 -
0.7.1 0.11.2 0.12.2 0.3.1 0.3.0 -
0.7.0 0.11.2 0.12 0.3.1 0.3.0 -
0.6.0 0.11.2 0.11 0.3.0 0.2.0 -
0.5.0 0.11.1 0.10 0.3.0 0.1.0 -
0.4.0 0.11.0 0.9 0.2.1 - -
0.3.0 0.10.1 0.8 0.2 - -
0.1.0 0.10.0 0.7 0.1 - -

WasmEdge Rust SDK will automatically search for the WasmEdge library in your system. Alternatively you can set the WASMEDGE_DIR environment variable to the path of the WasmEdge library (or the WASMEDGE_INCLUDE_DIR and WASMEDGE_LIB_DIR variables for more fine-grained control). If you want to use a local cmake build of WasmEdge you can set the WASMEDGE_BUILD_DIR instead.

WasmEdge Rust SDK will search for the WasmEdge library in the following paths in order:

  • $WASMEDGE_[INCLUDE|LIB]_DIR
  • $WASMEDGE_DIR
  • $WASMEDGE_BUILD_DIR
  • $HOME/.wasmedge
  • /usr/local
  • $HOME/.local

When the standalone feature is enabled the correct library will be downloaded during build time and the previous locations are ignored. You can specify a proxy for the download process using the WASMEDGE_STANDALONE_PROXY, WASMEDGE_STANDALONE_PROXY_USER and WASMEDGE_STANDALONE_PROXY_PASS environment variables. You can set the WASMEDGE_STANDALONE_ARCHIVE environment variable to use a local archive instead of downloading one.

The following architectures are supported for automatic downloads:

os libc architecture linking type
macos - x86_64, aarch64 dynamic
linux glibc x86_64, aarch64 static, dynamic
linux musl x86_64, aarch64 static

This crate uses rust-bindgen during the build process. If you would like to use an external rust-bindgen you can set the WASMEDGE_RUST_BINDGEN_PATH environment variable to the bindgen executable path. This is particularly useful in systems like Alpine Linux (see rust-lang/rust-bindgen#2360, rust-lang/rust-bindgen#2333).

Notice: The minimum supported Rust version is 1.71.

API Reference

Examples

The Examples of WasmEdge RustSDK repo contains a number of examples that demonstrate how to use the WasmEdge Rust SDK.

Contributing

Please read the contribution guidelines on how to contribute code.

License

This project is licensed under the terms of the Apache 2.0 license.

Dependencies

~5–19MB
~248K SLoC