A jq playground, written in WebAssembly.
jqkungfu was built by compiling jq into WebAssembly, so that it can run in the browser.
The advantages of this approach are:
- Speed: After the initial load time, jq queries are very fast because there are no round trips to a server
- Security: This approach runs jq within the browser; otherwise, we would need to carefully secure the app so that users can't run arbitrary commands on the server!
- Convenience: The app is purely front-end and is hosted as static files on a cloud storage provider
To compile jq to WebAssembly, run the
compile.sh code within an environment that includes Emscripten.
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.