Skip to main content

Crate sql_dialect_fmt_wasm

Crate sql_dialect_fmt_wasm 

Source
Expand description

Raw WebAssembly bindings for browser extension use.

This crate deliberately avoids wasm-bindgen so the Chrome extension can load a single local .wasm file without generated JavaScript glue. JavaScript owns input buffers allocated through sql_dialect_fmt_alloc; this module owns the last formatted result until the next call or sql_dialect_fmt_clear_result.

Functions§

sql_dialect_fmt_alloc
Allocate a writable byte buffer in Wasm memory.
sql_dialect_fmt_clear_result
Release the most recent formatted result, if any.
sql_dialect_fmt_dealloc
Free a buffer previously allocated by sql_dialect_fmt_alloc.
sql_dialect_fmt_format
Format the UTF-8 SQL source stored at ptr..ptr + len.
sql_dialect_fmt_format_with_dialect
Format the UTF-8 SQL source stored at ptr..ptr + len using an explicit dialect.
sql_dialect_fmt_result_len
Byte length of the most recent formatted result.
sql_dialect_fmt_result_ptr
Pointer to the most recent formatted result.