Languages
Wasmtime
Installing Wasmtime WebAssembly runtime on Ubuntu in TIDE
Wasmtime
Wasmtime is a standalone, high-performance WebAssembly (Wasm) runtime developed by the Bytecode Alliance, supporting WASI (WebAssembly System Interface).
Installation
Official Installation Script
Install Wasmtime using the official installation script:
curl https://wasmtime.dev/install.sh -sSf | bashReload your environment:
source ~/.bashrcInstalling via Cargo
Alternatively, if Rust and Cargo are installed:
cargo install wasmtime-cliVerification
Check that Wasmtime is installed:
wasmtime --versionWriting and Running WebAssembly Code
WebAssembly binaries (.wasm) or text representations (.wat) can be executed using Wasmtime.
Create a file named hello.wat:
(module
(import "wasi_snapshot_preview1" "proc_exit" (func $proc_exit (param i32)))
(memory (export "memory") 1)
(data (i32.const 0) "Hello, World from Wasmtime!\n")
(func (export "_start")
i32.const 0
call $proc_exit
)
)Run the WebAssembly text file directly with Wasmtime:
wasmtime run hello.wat