
Plasmate SOM Compiler Now Available as WebAssembly
One of the most common objections to adopting Plasmate has been binary distribution. The full Plasmate CLI is a compiled Rust binary that includes a browser engine for JavaScript execution and page rendering. It works well, but it requires platform-specific binaries and cannot run in environments that restrict native code execution (serverless functions, edge workers, browser contexts). The SOM compiler itself has no such limitation. It is pure computation: parse HTML with html5ever, walk the DOM tree, identify semantic regions, classify elements, generate stable IDs, serialize JSON. No system calls, no network, no file system. Just a function that takes a string and returns a string. Today we are publishing that function as WebAssembly. Install and use npm install plasmate-wasm const { compile } = require ( ' plasmate-wasm ' ); const html = ' <html><body><nav><a href="/about">About</a></nav><main><h1>Hello</h1><p>World</p></main></body></html> ' ; const som = JSON . parse ( compile (
Continue reading on Dev.to Webdev
Opens in a new tab




