Home

Awesome

jq kung fu

A jq playground, powered by WebAssembly.

Links

How?

jqkungfu was built by compiling jq to WebAssembly, so that it runs in the browser.

The advantages of this approach are:

Launch locally

To launch jqkungfu locally:

python3 -m http.server 9999

Then open http://localhost:9999 in your browser.

Compile to WebAssembly (optional)

To compile jq to WebAssembly, run the compile.sh code within an environment that includes Emscripten.

To set up your environment:

# Make sure to use "--recursive" so the jq submodule is initialized
$ git clone --recursive https://github.com/robertaboukhalil/jqkungfu.git

# Build the Docker image with needed dependencies
$ docker buildx build -t jqkungfu .

# Compile to WebAssembly
$ docker run --rm -it -v .:/src --entrypoint ./compile.sh jqkungfu

Learn More

This app is part of an example built for my book Level up with WebAssembly. Check it out if you're interested in more details, or to learn how to create similar applications.