d2
d2 copied to clipboard
install.sh: Windows support
just dealing with CGO
https://news.ycombinator.com/item?id=33711040
- [ ] build host
- [ ] terraauth update to support windows
In regards to the install script, idt it's worth adding a windows powershell/cmd.exe variant. Rather we add a https://chocolatey.org/ package instead.
Opened https://github.com/terrastruct/d2/issues/154
just adding another: https://news.ycombinator.com/item?id=33713748
https://news.ycombinator.com/item?id=33714812
we could have install.sh
working under git bash for sure I think
For tomorrow's release, I'll most likely just build windows releases manually.
Damn, sorry guys it looks like v8go doesn't even support windows anymore :(
https://github.com/rogchap/v8go#windows
I'm going to try and work around it but will need more time.
Also see https://github.com/terrastruct/d2/issues/31.
I could try to compile v8 with emscripten to wasm and then run the JS with the wasm bundle under a go wasm runtime like https://github.com/wasmerio/wasmer-go (though it uses cgo it builds on windows). Or compiling the JS directly to wasm with something like https://github.com/Shopify/javy#build
And try out https://github.com/dop251/goja because with pure Go
As well as see if bundling the node binary is into our Go binary is feasible, then no cgo necessary.
@nhooyr i will give https://github.com/dop251/goja a try.
still working through some things but the fact it runs is promising. https://github.com/terrastruct/d2/pull/337
dagre is pretty small though. whether it can handle Mathjax's build is a bigger question
good fucking find. v8go has been replaced with Goja. should be all good for full windows build

See https://github.com/terrastruct/d2/pull/378