Comments (14)
from d2.
we can close this now that goja's worked.
from d2.
Another possible approach is to compile with qemu. I believe this is how code-server now handles cross compilation.
from d2.
On nvm, qemu would help us avoid needing to maintain a builder of each architecture and OS but we'd still need one of each OS at the least. I don't think there's any easy way to cross compile for a different platform apart from using zig which I'll need to research further.
from d2.
Relevant: rogchap/v8go#170
from d2.
https://xeiaso.net/blog/carcinization-golang
we could also compile v8 to wasm and execute in a pure go wasm runtime instead. then no cgo at all!
from d2.
This currently fully breaks build on musl, including of the d2 command itself (not just d2plugin-dagre).
Is there no easy way to cut this out and require e.g. a library to be present on the system, or something else like that?
from d2.
d2 imports d2plugin-dagre by default. But the d2 command itself is pure Go. You can use --tags nodagre
to build without dagre. See
Line 1 in f64ed49
or CGO_ENABLED=0 go build ...
The only pure Go layout engine we currently have is TALA which requires a license. See https://github.com/terrastruct/tala
from d2.
@alixander damn nice how did you know that someone opened a PR fixing it?
from d2.
i brieflyz considering calling React from Go for server side renders (probably won't go with that), and the potential extra reliance on v8go made me investigate its activity.
from d2.
Can also try https://github.com/dop251/goja?
from d2.
Also means it will be far easier to do #136 when there's no cgo involved.
from d2.
Ok maybe not far given the dagre/elk javascript can just run in the browser lol.
from d2.
omg what if we just embedded the node binary? code-server used to do this thing where they embedded the node binary/js into a single binary. they probably still do. we could do it too.
from d2.
Related Issues (20)
- investigate compile error HOT 1
- null globs based on class filter
- about handling '&' in markdown HOT 1
- deprecate `shape: text` HOT 1
- HTTP server directly in binary HOT 3
- [v0.6.4] label positions are not stable.
- fix sequence diagram lines
- [v0.6.5] stderr: bad usage: unrecognized command: routeedges HOT 2
- [v0.6.5]minimum height is not character height HOT 2
- Local icons are not resolved correctly by cli HOT 5
- d2oracle: set vars
- d2 playground - export to png missing texts in layout ELK HOT 5
- Canvas small HOT 4
- user reported d2 hanging when playwright could not be installed
- option to add bridges/arcs to crossings/intersections HOT 4
- globs: `**.` should match root items
- bidirectional connection animation HOT 12
- Combining circle shape for arrowheads with sketch mode removes all arrowheads HOT 6
- Nulling globbed connections in scenarios is not working as expected
- bidirectional connection animation in sketch mode HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from d2.