wasmedge(1) | General Commands Manual | wasmedge(1) |
wasmedge - standalone runtime for WebAssembly
wasmedge [SUBCOMMAND] [OPTIONS] [--] WASM_OR_SO [ARG ...]
WasmEdge is a lightweight, high-performance, and extensible WebAssembly <https://webassembly.org/> runtime for cloud native, edge, and decentralized applications. It powers serverless apps, embedded functions, microservices, smart contracts, and IoT devices.
The WasmEdge Runtime provides a well-defined execution sandbox for its contained WebAssembly bytecode program. The runtime offers isolation and protection for operating system resources (e.g., file system, sockets, environment variables, processes) and memory space. The most important use case for WasmEdge is to safely execute user-defined or community-contributed code as plug-ins in a software product (e.g., SaaS, software-defined vehicles, edge nodes, or even blockchain nodes). It enables third-party developers, vendors, suppliers, and community members to extend and customize the software product.
wasmedge accepts a file path, WASM_OR_SO, to a WebAssembly file or a native shared library object as generated by wasmedge compile(1).
ARG is the optional command line arguments array:
Assuming a WebAssembly program placed under the file fibonacci.wasm, set up so to export a fib() function and accepting a single i32 integer as the input parameter, one can execute wasmedge in reactor mode to invoke the exported function as follows:
$ wasmedge --reactor fibonacci.wasm fib 10
Assuming a WebAssembly program contains amain()function, printing out hello` followed by the command line arguments:
$ wasmedge hello.wasm world
Copyright © 2019-2022 Second State INC. Licensed under the Apache License, Version 2.0.
wasmedge-compile(1)
A complete manual of WasmEdge <https://wasmedge.org/docs/> can be found online.
2024-04-01 |