Introduction to Wasm Modules

The Multilingual Engine (MLE) supports WebAssembly (Wasm) modules, enabling JavaScript code running in the database to import and use Wasm libraries.

MLE support for WebAssembly enables database applications to access a wide range of Wasm libraries. Moreover, many native applications developed in Go, C, and Rust can be compiled into Wasm binaries and run safely within the Oracle AI Database MLE environment. The MLE JavaScript API lets you to write or reuse existing Wasm modules for specific tasks and easily call these modules from JavaScript code running in the database. This approach reduces the learning curve and development effort by supporting familiar languages and tools, allowing for streamlined integration of complex functionalities into database applications.

WebAssembly support is enabled by default and can be controlled at the system or session level using the MLE_PROG_LANGUAGES initialization parameter.

Specify LANGUAGE WASM during module creation to create an MLE Wasm module, using either a BFILE or a BLOB to supply the Wasm binary. For example:

CREATE OR REPLACE MLE MODULE my_wasm_mod
LANGUAGE WASM
USING BLOB SELECT CONTENT FROM tab_w_blob_col
FETCH FIRST ROW ONLY;
/

See the following specifications for more information about the supported WebAssembly features:

See Also: