Pikchr (pronounced "picture") is a PIC-like markup language for diagrams in technical documentation. https://pikchr.org/
This repo provides an example on how to compile Pikchr to WASM and use it in the browser.
In this repo:
Makefile
to downloadpikchr.c
and use Emscripten (https://emscripten.org) to compile it to WASMpikchr.js
the WASM modulepikchr.mjs
same as above but as ES6 moduleexample.html
see https://felixr.github.io/pikchr-wasm/example.html
As the Pikchr source (https://pikchr.org/home/file?name=pikchr.c), the contents of the repo are released under the 0-clause BSD license:
Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.