/wasm-sqlparser

WIP WASM build of Tableland's sqlparser

Primary LanguageJavaScriptMIT LicenseMIT

wasm-sqlparser

WIP WASM build of Tableland's sqlparser

Install build tools

I use the Rust https package because it handles the correct MIME types for served files.

brew tap tinygo-org/tools
brew install tinygo
go get -u github.com/gonowa/wasm-opt

cargo install https

Bootstrap with wasm helper functions

Use the corresponding tinygo version

wget https://raw.githubusercontent.com/tinygo-org/tinygo/v0.23.0/targets/wasm_exec.js

Build with tinygo

tinygo build -wasm-abi=generic -gc=leaking -no-debug -o main.wasm -target wasm ./main.go
wasm-opt -O main.wasm -o main.wasm

This will produce main.wasm, and should be no more than 425K in size.

Serve folder as web-app

You can use whatever file server you want here, just make sure the wasm file is served as application/wasm.

httplz