Skip to content

Simplify the creation of a standalone Vega executable #1959

@ggrossetie

Description

@ggrossetie

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions