Replies: 2 comments 2 replies
-
The size is primarily due to:
Hypothetically if there were some ceiling on size of 50% of current, I'd probably use AI to transpile the dagre code to Go, and make a build that doesn't include ELK. All other optimizations might reduce by 10% or so. Maybe can unbundle fonts. The JS/WASM build gets rid of the JS runner (as it just runs in a JS context): #2293 I haven't prioritized it because disk space just isn't that limited in the server contexts that D2 runs in. I can see that hugo is a bit smaller than D2. Would this be a blocker in getting D2 integrated into hugo? |
Beta Was this translation helpful? Give feedback.
-
@alixander This is the POC. Screencast.from.2025-01-30.17-06-23.webm |
Beta Was this translation helpful? Give feedback.
-
I am curious if there are any tips for reducing the size of the compiled code, other than the standard "-s -w" ldflags. The downloaded d2 executable for linux amd64 is 46 MB. Adding d2 to Hugo (proof of concept) increased the executable size by 17M, a 33% increase.
I suspect this is not a priority right now, and that's fine. But any guidance or even knowing about future plans in this area would be helpful.
Thanks.
This is what we're importing:
Beta Was this translation helpful? Give feedback.
All reactions