Library / SDK
yuankunzhang/charming avatar
yuankunzhang/charming

Charming, a Rust wrapper around Apache ECharts, with two of its three renderers switched off

A visualization library for Rust

2,611 stars120 forksRustApache-2.0

At a glance

What is it?
yuankunzhang/charming builds Apache ECharts charts from typed builder structs in Rust. The parts worth reading are the ones it declines to promise: no supported Rust version, no custom themes yet, and raster output hidden behind a second feature flag.
Who is it for?
Charming is worth adopting when you want ECharts styling and a Rust API and you are willing to hold the ECharts version yourself, since the wrapper mirrors option names rather than hiding them. Use the HTML renderer for browser side charts and pay for the ssr flag only when a build step has to produce a PNG without a browser.
Can I use it commercially?
Yes. Apache-2.0 is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
Is it still maintained?
Yes. The repository last received commits 17 days ago.
What is it written in?
Mainly Rust, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on November 22, 2026, and from our analysis. They are not legal advice.

From daily snapshots

Star history

  • yuankunzhang/charming2,611 ★ · +13
Star history
Repository2026-09-302026-11-22
yuankunzhang/charming2.6k2.6k

13 Stars in the last 53 days, measured from the daily GitHub snapshot. Compare with other projects

Editorial analysis

Three renderers, and two of them are off until you ask

The crate itself is added in one line, and the version you get is the version your lockfile resolves, since there are no releases on this repository to pin to:

sh
$ cargo add charming

The library then exposes one chart type and three ways to get pixels out of it. HtmlRenderer turns a chart into an HTML fragment and leaves the drawing to the user's web browser, which suits client side work such as a web application. ImageRenderer writes an image file, and it does the drawing itself by running the JavaScript of ECharts inside an embedded deno_core engine. WasmRenderer runs the chart in a WebAssembly runtime instead. Only the first works out of the box: ImageRenderer needs the ssr feature and WasmRenderer needs the wasm feature, and both are declared disabled by default. The two flags are also mutually exclusive, a constraint the file states twice, once at the end of the renderer list and again at the head of the feature flag section. Choosing a renderer is therefore partly a choice of which build of the crate you can have.

The format list is longer than what one flag unlocks

The highlights section advertises rendering to HTML, SVG, PNG, JPEG, GIF, WEBP, PNM, TIFF, TGA, DDS, BMP, ICO, HDR, OPENEXR, FARBFELD, AVIF and QOI, seventeen formats presented as one flat capability. They are not one capability. HTML comes from HtmlRenderer with no flags. Everything else comes from ImageRenderer, which the ssr flag turns on, and the raster formats need a second flag, ssr-raster, whose own entry reads that it enables raster support to the ImageRenderer for png, jpg and the rest. So a chart written against, say, AVIF or QOI requires two feature declarations, while an SVG needs only one, and a plain HTML fragment needs neither. The advertised list does not carry that distinction, which is the sort of thing worth knowing before writing build configuration against it.

No supported Rust version, because the deno dependency keeps moving

There is a section headed MSRV, and it declines to give an answer. The stated reason is that no minimal supported Rust version is provided, that the answer is usually the latest stable release, and that the deno dependency upgrades its version very frequently. That is an honest reason and a costly one. A library with no floor means a project depending on it inherits the movement of a JavaScript runtime engine underneath it, so a working lockfile can become unbuildable after a routine dependency bump elsewhere, and pinning an old toolchain to keep Charming compiling is not something the file offers guidance on. The practical reading is that Charming tracks the newest stable Rust rather than a tested older one, and that anyone on a fixed toolchain should find out early whether that is a problem for them.

Fourteen themes ship, and custom themes are promised twice

The theme table is a grid of fourteen names: Default, Dark, Vintage, Westeros, Essos, Wonderland, Walden, Chalk, Infographic, Macarons, Roma, Shine, Purple Passion and Halloween. Selection goes through the Theme enum, so a theme is a value rather than a file path or a stylesheet you register. Immediately after the table, the file says future versions will support custom themes, and the same sentence reappears at the end of the Themes section further down, where the Westeros example sits. The duplication makes the gap easier to miss rather than clearer: custom themes are a stated intention and not a present feature, and a project that needs its own palette has no documented way in. The Westeros example is also worth noting for a different reason, since it renders through ImageRenderer and therefore needs the ssr flag that the surrounding prose does not mention.

The pie chart example ends inside its own data tuple

Basic Usage opens with a pie chart in Rust that imports Legend, ItemStyle, Pie and PieRoseType, sets a legend at the bottom, gives the series the name Nightingale Chart, chooses a radius rose type, sets radius to 50 and 150, centres it, rounds the item style corners to 8, and starts a data vector. The last line it reaches is a pair whose value is 38.0 and whose label opens as rose 2. There is no closing parenthesis, no closing bracket for the vector, and no end to the function after it. The sentence claiming this code creates an SVG file is followed by nothing at all in this file. The separate renderer sample has the same shape: it opens the HtmlRenderer, builds a 1000 by 800 renderer, renders to a string and saves to a file, moves on to ImageRenderer with a mutable binding, and ends on a comment about rendering to PNG bytes with no code under it.

rs
// Use HtmlRenderer.
use charming::HtmlRenderer;

// Chart dimension 1000x800.
let renderer = HtmlRenderer::new("my charts", 1000, 800);
// Render the chart as HTML string.
let html_str = renderer.render(&chart).unwrap();
// Save the chart as HTML file.
renderer.save(&chart, "/tmp/chart.html").unwrap();

// Use ImageRenderer. The `ssr` feature needs to be enabled.
use charming::{ImageRenderer, ImageFormat};

// Chart dimension 1000x800.
let mut renderer = ImageRenderer::new(1000, 800);
// Render the chart as SVG string.
renderer.render(&chart).unwrap();
// Render the chart as PNG bytes.

Two license files sit next to one declared license

The top level of the repository holds LICENSE-APACHE and LICENSE-MIT as separate files, while the repository's own metadata declares the license as Apache-2.0. Nothing in the file explains how the two relate, whether one is a fallback, or whether a choice is made per component, and this account does not pick one on your behalf. That matters more than usual for a crate, because the choice determines what a downstream project can do with it and whether it can be placed inside a product with a different license. The same top level also holds CHANGELOG.md, even though the repository publishes no GitHub releases at all. Version history therefore lives in a file in the tree rather than in release notes, and crates.io and docs.rs are the distribution points named in the header.

The framework demos are outside the workspace

The workspace declares resolver 2 with exactly three members: charming, charming_macros and gallery. Everything under examples/ is listed as excluded, and there are five of them, for Dioxus on the web, Dioxus on the desktop, Leptos, Sycamore and Yew. Being excluded means each demo resolves its own dependency graph instead of inheriting the workspace's, so five working integrations are also five places where the pinned Charming version can drift from the one the rest of the tree builds against. The second member, charming_macros, is a crate of its own that the file never explains, so what its macros generate is not answerable from here. The development environment is likewise Nix based, with devenv.nix, devenv.yaml, devenv.lock and an .envrc present at the top.

The gallery is a second binary you can run yourself

Gallery examples are workspace members, not documentation screenshots. You can clone the repository and run cargo run --bin gallery to see the interactive charts on a rendered HTML page, and each example in that page links to its own source file. One of them, gallery/src/dataset/encode_and_matrix.rs, draws a chart with four sub charts. The categories visible in this file start with bar charts, where eight files are named individually, including radial polar bar label position, tangential polar bar, stacked column, waterfall and world population, followed by two boxplot examples and the start of the candlestick section. The list of categories stops inside the first candlestick link, so the rest of what the gallery covers is not visible here.

Editorial conclusion

Charming is worth adopting when you want ECharts styling and a Rust API and you are willing to hold the ECharts version yourself, since the wrapper mirrors option names rather than hiding them. Use the HTML renderer for browser side charts and pay for the ssr flag only when a build step has to produce a PNG without a browser. Before you commit, check three things: that your Rust toolchain can follow the deno dependency, which keeps moving with no stated floor, that the theme you need is one of the fourteen that ship today rather than a custom one, and which of the two licenses at the top level your organisation treats as governing.

Frequently asked questions

What is Charming, the Rust library?

A chart rendering library for Rust built on Apache ECharts, with a declarative builder API. It offers three renderers: HtmlRenderer, which emits an HTML fragment and lets the browser draw it, ImageRenderer, which runs the ECharts JavaScript inside an embedded deno_core engine, and WasmRenderer, which runs it in a WebAssembly runtime.

Which Charming feature flags do I need to render a PNG?

Two of them. The ssr feature enables ImageRenderer, and ssr-raster adds raster support to it for png, jpg and the other image formats. Both are off by default. The wasm feature is a separate path for WasmRenderer and cannot be combined with ssr.

What Rust version does Charming require?

No minimal supported Rust version is stated, and the answer is usually the latest stable release, because the deno dependency upgrades its version very frequently.

Can Charming use a custom theme yet?

Not yet. Fourteen themes ship out of the box, from Default and Dark through Westeros, Walden, Macarons and Halloween, selected through the Theme enum, and the file says twice that future versions will support custom themes.

Does Charming publish releases on GitHub?

The repository has no GitHub releases. Its version history sits in a CHANGELOG.md at the top level, and the header of the file points at crates.io and docs.rs for the published crate.

Official sources

  1. Issues
  2. License: Apache-2.0
  3. README
  4. yuankunzhang/charming on GitHub
Add this badge to your README

If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/yuankunzhang-charming.svg)](https://hysenlabs.com/projects/yuankunzhang-charming)

Star history chart for your README

markdown
[![Star history](https://hysenlabs.com/chart/yuankunzhang-charming.svg)](https://hysenlabs.com/projects/yuankunzhang-charming)

Was this useful?