Skip to content

Instantly share code, notes, and snippets.

@Hywan
Created August 28, 2019 14:29
Show Gist options
  • Save Hywan/4e528227a54b459134424e8d04b7e718 to your computer and use it in GitHub Desktop.
Save Hywan/4e528227a54b459134424e8d04b7e718 to your computer and use it in GitHub Desktop.
Postgres WebAssembly usage
-- New instance of the `simple.wasm` WebAssembly module.
SELECT wasm_new_instance('/absolute/path/to/simple.wasm', 'ns');
-- Call a WebAssembly exported function!
SELECT ns_sum(1, 2);
-- ns_sum
-- --------
-- 3
-- (1 row)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment