nadavrot / layout

Layout is a rust library and a tool that renders Graphviz dot files.
MIT License
648 stars 38 forks source link

Can I use this in a browser? #17

Closed Regenhardt closed 1 year ago

Regenhardt commented 1 year ago

So it seems rust can easily be compiled to WebAssembly, at least that's what I read. Is there anything stopping me from throwing this in a compiler and having it generate an svg in the browser by throwing my dot source into the module? I don't really understand how to build or integrate WASM yet, this is like my first try of understanding that.

barafael commented 1 year ago

Apparently, you can.

See this demo: https://barafael.github.io/wasm-dot-renderer/

Code is here: https://github.com/barafael/wasm-dot-renderer

Please close the issue if this answers your question.

Regenhardt commented 1 year ago

Ha nice, thanks a lot!