wasmedge(1)
π wasmedge(1) β General Commands Manual π
okay bestie, sit down, hydrate, and let me tell you about wasmedge β the standalone runtime for WebAssembly. this is section 1 of the General Commands Manual, so like, it's a command, and it's iconic, and you're gonna learn it. no cap. π«Ά
β¨ SYNOPSIS β¨
wasmedge [SUBCOMMAND] [OPTIONS] [--] WASM_OR_SO [ARG ...]
like, that's the whole vibe in one line. subcommand? maybe. options? maybe. the wasm file or shared object? mandatory, bestie. args after it? sure, why not.
πΈ DESCRIPTION πΈ
so WasmEdge is a lightweight, high-performance, and extensible WebAssembly runtime, and it's built for cloud native, edge, and decentralized applications. it literally powers serverless apps, embedded functions, microservices, smart contracts, and IoT devices. the range?? unmatched. π
the WasmEdge Runtime hands you a well-defined execution sandbox for the WebAssembly bytecode program it's containing. what that means is: it gives you isolation and protection for your operating system resources β think file system, sockets, environment variables, processes β plus memory space. the most important use case, fr fr, is safely executing user-defined or community-contributed code as plug-ins inside a software product (like SaaS, software-defined vehicles, edge nodes, or even blockchain nodes β yes, all of those). and that's how it lets third-party developers, vendors, suppliers, and community members extend and customize the software product. entrusting randos with your runtime but safely? that's the whole point. π
wasmedge takes a file path, WASM_OR_SO, pointing at a WebAssembly file or a native shared library object β the kind generated by wasmedge compile(1). ok so yes, that cross-reference is doing a lot of work, keep reading.
ARG is the optional command line arguments array, and the way it behaves depends on the mode, so pay attention bestie:
- In reactor mode, the first argument is gonna be the function name, and the arguments after
ARG[0]will be parameters of wasm functionARG[0]. she's calling functions directly, she's that girl. - In command mode, the arguments are the command line arguments of the WASI
_startfunction. they're also known as command line arguments (argv) for a standalone C/C++ program. so like, classic main-argc-argv energy. π
π SUBCOMMANDS π
compileβ the WasmEdge compiler subcommand. seewasmedge-compile(1)for all the options that apply in this mode. this is the "make it fast ahead of time" era.runβ the WasmEdge runtime tool subcommand.wasmedge runis literally just an alias ofwasmedgewithout the--versionoption. the options for this mode? they're down below, keep scrolling. β¬οΈ
β¨ OPTIONS β¨
π Generic program information
-h,--helpβ show the help messages. and it will ignore every other argument below, so don't bother stacking them, she's not listening.-v,--versionβ show the version information. same energy: it will ignore all the other arguments below.
π Basic options
--reactorβ enable reactor mode. reactor mode calls_initializeif it's exported.--dirβ bind directories into the WASI virtual filesystem. each directory can be specified as--dir host_path. you can also map a guest directory onto a host directory with--dir guest_path:host_path, whereguest_pathis the path that will correspond tohost_pathfor calls likefopeninside the guest. mapping?? we love a good mapping. πΊοΈ--envβ environmental variables. each variable can be specified as--env NAME=VALUE.--force-interpreterβ forcibly run WASM in interpreter mode. no compiled code, just vibes.--forbidden-pluginβ the list of plugins to ignore. not invited, blocked, periodt.
π Statistics information
--enable-time-measuringβ enable generating code for counting time during execution. β±οΈ--enable-gas-measuringβ enable generating code for counting gas burned during execution. β½--enable-instruction-countβ enable generating code for counting WebAssembly instructions executed. counting each and every one, meticulous queen.--enable-all-statisticsβ enable generating code for every statistics option β that includes instruction counting, gas measuring, and execution time. all of them. the whole set. π
π§ Resource limitations
--time-limitβ limitation of maximum time (in milliseconds) for execution. the default value is0, which means no limitations at all. so if you don't set it, she will run forever and that's on you.--gas-limitβ limitation of execution gas. the upper bound can be specified as--gas-limit GAS_LIMIT.--memory-page-limitβ limitation of pages (as size of 64 KiB) in every memory instance. the upper bound can be specified as--memory-page-limit PAGE_COUNT.
π§ WebAssembly proposals
--disable-import-export-mut-globalsβ disable the Import/Export of mutable globals proposal.--disable-non-trap-float-to-intβ disable the Non-trapping float-to-int conversions proposal.--disable-sign-extension-operatorsβ disable the Sign-extension operators proposal.--disable-multi-valueβ disable the Multi-value proposal.--disable-bulk-memoryβ disable the Bulk memory operations proposal.--disable-reference-typesβ disable the Reference types proposal.--disable-simdβ disable the SIMD proposal.--enable-multi-memoryβ enable the Multiple memories proposal.--enable-tail-callβ enable the Tail-call proposal.--enable-extended-constβ enable the Extended-const proposal.--enable-threadsβ enable the Threads proposal.--enable-allβ enable all features. literally all of them. go off. π
π EXAMPLE π
π Call a WebAssembly function
say you've got a WebAssembly program sitting in a file called fibonacci.wasm, set up so it exports a fib() function and takes a single i32 integer as the input parameter. you can run wasmedge in reactor mode and invoke that exported function like this:
$ wasmedge --reactor fibonacci.wasm fib 10
look at her go. β¨
π Execute a standalone WebAssembly program
now say you've got a WebAssembly program containing a main() function that prints out hello followed by the command line arguments. that one goes like:
$ wasmedge hello.wasm world
π AUTHOR π
Copyright Β© 2019-2022 Second State INC. Licensed under the Apache License, Version 2.0.
π SEE ALSO π
Regular manual pages
Full documentation
a complete manual of WasmEdge can be found online. iykyk. π
and that's the tea, bestie β this page was dated 2026-09-08 and it lives in the wasmedge(1) slot of your manual, so go forth and run some wasm. obsessed with you. mwah. π
ππ¦
π¦ where this page comes from
- ubuntu stonking: wasmedge 0.16.1+dfsg-1ubuntu1 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms