difftastic icon indicating copy to clipboard operation
difftastic copied to clipboard

Make WASM builds

Open CetinSert opened this issue 1 year ago • 3 comments

difftastic would benefit greatly from wasm builds! It would open the project up to web browsers, deno deploy, bun oven, cloudflare workers!

CetinSert avatar Oct 14 '22 21:10 CetinSert

I'm open to PRs for this. The fiddly bit is getting the tree-sitter parsers compiled to wasm, as they're C code.

Wilfred avatar Oct 28 '22 05:10 Wilfred

This will be a great feature.

I just found that actually the underlying tree-sitter had have a WASM version for years. Please check https://github.com/tree-sitter/tree-sitter/blob/master/lib/binding_web/README.md

So, is it possible to build WASM version of Diffastic?

BTW, on web a Markdown display for code will be better than a direct HTML display.

Thank you in advance,

MRYingLEE avatar Mar 25 '24 23:03 MRYingLEE

Hi @Wilfred

I wanted to understand what is the feasibility of doing this given that tree-sitter has a WASM based version (https://github.com/wasm-lsp/tree-sitter-wasm). Also, if you can attach any comprehensive GitHub comments, or guides to build this it would be helpful.

Thanks!

psymbio avatar Apr 11 '24 06:04 psymbio