An application binary interface (ABI) is a low-level protocol that lets separately compiled binary modules interact through machine or assembly code. Unlike a higher-level API, it specifies the interfaces a runtime and module use to communicate. section 10.0
WebAssembly System Interface (WASI) uses an ABI to connect WebAssembly modules with their underlying system. A compatible runtime supplies the implementation, allowing one compiled module to run in different environments without rewriting its core logic. section 10.0 section 10.2
An ABI-based WebAssembly workflow separates responsibilities:
- Compile application code into a WebAssembly module. section 10.0
- Target a runtime such as WasmEdge so Rust uses the runtime's supported interfaces. section 10.2
- Let the runtime mount the module, call its main function, and handle operating-system interaction. section 10.2
- Pass application arguments through the module's argument list rather than changing the binary's internal logic. section 10.2
Running a Rust search module
A Rust search application separates reusable search logic into a library and exposes a binary entry point. Compiling for wasm32-wasi and running the resulting module with WasmEdge lets the runtime call main, provide system interaction, and accept a search term such as "test". section 10.2
