-
-
Notifications
You must be signed in to change notification settings - Fork 274
Description
Vega relies on the Node canvas library, which uses a binding to the Cairo system library to convert diagrams to PDF and PNG. This makes it more complicated to create a portable binary.
The latest version of Vega is now ESM only but as far as I know, pkg does not support ESM. The project is also archived since Node.js 21+ can generate single executable applications: https://nodejs.org/api/single-executable-applications.html.
Deno is also capable of producing standalone executables.
However, creating a portable executable becomes complicated as soon as the library has a system-level binding. So far, I haven’t been able to find a solution.
As an alternative, we could convert Vega/Vega-Lite diagrams to SVG natively (i.e., without using a system-level binding), and then use a image processing library/CLI to convert the SVG into other formats (for instance, using ImageMagick or VIPS. This also allows support for additional formats like JPEG, WebP, TIFF, and so on.