demo · v130

Import binding playground

Pick a JS string operation — charCodeAt, fromCharCode, length, concat, substring, equals, compare, codePointAt, intoCharCodeArray, fromCharCodeArray — and the page emits the exact imports object you need in JS, the matching (import "wasm:js-string" ...) declarations in WAT, and a step-by-step trace of how a Wasm module would call it.

builtin to import

sample inputs

JS instantiate code


      

WAT import line(s)


      

execution trace (synthetic)

output



    

All ten standardised builtins ship in Chrome 130. They are imported from the special module wasm:js-string. The browser short-circuits calls to native string ops — no JS↔wasm bouncing per character.

see also