I have also explored running standalone WebAssembly programs and turning native Mermaid-rendering code into browser-based experiments. These examples extend my broader notes on browser based tools and webassembly.
I called running ./myprogram.wasm arg1 arg2 “pretty wild.”
I extracted that Rust Mermaid rendering code and compiled it to WebAssembly so people could try it directly in a browser.
The Rust Mermaid renderer produces diagrams using Unicode box-art.
I added a browser-based comparison tool using the Go AlexanderGrooff/mermaid-ascii library, also compiled to WebAssembly by Fable 5.
I added the Go-library tool for comparison with the Rust Mermaid renderer.
I collect experiments and techniques for using WebAssembly to run language runtimes and other software in browsers, including sandboxing untrusted JavaScript, rendering a website in C, and repurposing an older code-counting program. These examples complement my notes on python in webassembly and sandbox security and isolation.
I figured out how to use npm and webpack to get a copy of QuickJS, a JavaScript runtime compiled to WebAssembly that is useful for executing untrusted code in a sandbox.
<script src="dist/quickjs.js"></script>
I linked detailed notes on using npm and webpack to get QuickJS at https://t.co/5dEeldK2yC.
I figured out how to use npm and webpack to get a copy of QuickJS. My preference is: I don't want to have to run npm/webpack/etc as part of my regular JavaScript development process, I just want libraries that I can load with a <script> tag!
I wrote notes on Clay, a fascinating ~2,000 line dependency-free C layout engine project. It can be run via WebAssembly to define a website’s front end entirely in C, which I characterized as inadvisably.
I linked my notes on Clay at https://t.co/8z6lALMSYo.
Just for fun, I had Claude Code figure out how to run the ~2001-era Perl and C SLOCCount program in WebAssembly in a browser.
The browser UI I described for SLOCCount can count source code lines from pasted text, a GitHub repository, or a zip file.
I shared the SLOCCount project at https://t.co/AbLlWaBOjQ and an animated demo at https://t.co/MqboU32BVR.
Related: browser based tools and webassembly, python in webassembly, sandbox security and isolation