Created
August 28, 2019 14:36
-
-
Save Hywan/973d227be5ee91de3bb9973a81e7035e to your computer and use it in GitHub Desktop.
Introspect a WebAssembly module with Postgres
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Select all WebAssembly instances. | |
SELECT * FROM wasm.instances; | |
-- id | wasm_file | |
-- --------------------------------------+------------------------------- | |
-- 426e17af-c32f-5027-ad73-239e5450dd91 | /absolute/path/to/simple.wasm | |
-- (1 row) | |
-- Select all exported functions for a specific instance. | |
SELECT | |
name, | |
inputs, | |
outputs | |
FROM | |
wasm.exported_functions | |
WHERE | |
instance_id = '426e17af-c32f-5027-ad73-239e5450dd91'; | |
-- name | inputs | outputs | |
-- --------+-----------------+--------- | |
-- ns_sum | integer,integer | integer | |
-- (1 row) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment