Skip to main content

Type it. See it appear. Watch it animate.

Project description

kymostudio-core (Rust)

Pure-Rust SVG → PNG rasterizer core for kymostudio, built on resvg. No browser, no headless Chrome, no C/Cairo/Skia system dependencies.

One core crate, compiled to four targets from a single source via feature flags — so the Rust CLI, the Python package, and the JS/browser playground all share the exact same resvg engine (resvg is CSS-class-aware, the reason the project avoids cairosvg):

Target Feature Build tool Consumer
Native lib + kymo CLI system-fonts (default) cargo standalone CLI
Python extension (abi3) python maturin → wheel packages/python
wasm (browser + Node) wasm wasm-pack → pkg packages/js, website playground

svg_to_png(svg: &[u8], scale: f32) -> Result<Vec<u8>, RenderError> is the one core function; each binding (src/python.rs, src/wasm.rs) is a thin façade.

CLI — kymo

kymo -i in.svg out.png          # rasterize at intrinsic size
kymo -i diagram.svg             # output defaults to diagram.png
kymo -i diagram.svg -s 2 hi.png # 2× resolution
Flag Meaning
-i, --input <FILE> Input SVG (required)
-o, --output <FILE> Output PNG (or pass it positionally)
-s, --scale <N> Scale factor, 1.0 = intrinsic size (default 1)
-h, --help / -V, --version Help / version

Build each target

# Native (CLI + lib + tests)
cargo test
cargo build --release --bin kymo          # -> target/release/kymo

# Python wheel (abi3, one wheel for CPython ≥ 3.10)
maturin build --release --out dist        # -> dist/kymostudio_core-*-abi3-*.whl
#   import _kymostudio_core; _kymostudio_core.svg_to_png(svg_bytes, scale)

# wasm (browser + Node) — system-fonts OFF (no fs/mmap on wasm)
wasm-pack build --target web --out-dir pkg --out-name kymostudio_core \
  -- --no-default-features --features wasm
#   import { svgToPng } from './pkg/kymostudio_core.js'

CI builds and smoke-tests all of the above across Linux/macOS/Windows — see .github/workflows/rust.yml.

Library use (Rust)

let svg = std::fs::read("in.svg")?;
let png: Vec<u8> = kymostudio_core::svg_to_png(&svg, 1.0)?;
std::fs::write("out.png", png)?;

The version is kept in lockstep with the rest of the monorepo (Cargo.tomlversion).

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

kymostudio_core-0.3.3.tar.gz (11.7 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

kymostudio_core-0.3.3-cp310-abi3-win_amd64.whl (1.4 MB view details)

Uploaded CPython 3.10+Windows x86-64

kymostudio_core-0.3.3-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.5 MB view details)

Uploaded CPython 3.10+manylinux: glibc 2.17+ x86-64

kymostudio_core-0.3.3-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (1.5 MB view details)

Uploaded CPython 3.10+manylinux: glibc 2.17+ ARM64

kymostudio_core-0.3.3-cp310-abi3-macosx_11_0_arm64.whl (1.4 MB view details)

Uploaded CPython 3.10+macOS 11.0+ ARM64

kymostudio_core-0.3.3-cp310-abi3-macosx_10_12_x86_64.whl (1.4 MB view details)

Uploaded CPython 3.10+macOS 10.12+ x86-64

File details

Details for the file kymostudio_core-0.3.3.tar.gz.

File metadata

  • Download URL: kymostudio_core-0.3.3.tar.gz
  • Upload date:
  • Size: 11.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for kymostudio_core-0.3.3.tar.gz
Algorithm Hash digest
SHA256 f7f2c541d2904d85206c85f974fc8f78ee066e8dfced72870594ae13f4731221
MD5 d9f1f59e9deaedccd10e5650fb3c9aa3
BLAKE2b-256 a1b87a44903846e92392e1d6e4e516451e89fb4333947def799c8636c9110dd1

See more details on using hashes here.

Provenance

The following attestation bundles were made for kymostudio_core-0.3.3.tar.gz:

Publisher: release-crate.yml on kymostudio/kymostudio

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file kymostudio_core-0.3.3-cp310-abi3-win_amd64.whl.

File metadata

File hashes

Hashes for kymostudio_core-0.3.3-cp310-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 160f067f366e5dab8e6e2891d16071adeee656bd21c140bc35b9cae9a8bd2616
MD5 a1332257d33a469a04c8e5344d79261f
BLAKE2b-256 976961094f1d657fc71784ab9505f389a7852232b855bf4c7fcc85f5cd6f5abc

See more details on using hashes here.

Provenance

The following attestation bundles were made for kymostudio_core-0.3.3-cp310-abi3-win_amd64.whl:

Publisher: release-crate.yml on kymostudio/kymostudio

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file kymostudio_core-0.3.3-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for kymostudio_core-0.3.3-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 4215a32bdb96a3666cec1b82b9e3786d8ef66332a5338c2aa651c3753d4b7193
MD5 db25db11541a8ff6087cd2b21dadff08
BLAKE2b-256 7d5a0ea778fd1bc1c86b584825bfc2ee5f7f3b97c8e8e6f73c1fe88952efde3c

See more details on using hashes here.

Provenance

The following attestation bundles were made for kymostudio_core-0.3.3-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: release-crate.yml on kymostudio/kymostudio

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file kymostudio_core-0.3.3-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for kymostudio_core-0.3.3-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 f7ab927fc24ca661b16a1c3f0666ed39731466bb78a108d8415ceb8c74e5e86d
MD5 9b3c080ad06e5ee38899ca951d32e423
BLAKE2b-256 ea9bdf3b5d848a9c475a738ff6bd2044197460efb0b4b98356503476234b9d5d

See more details on using hashes here.

Provenance

The following attestation bundles were made for kymostudio_core-0.3.3-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl:

Publisher: release-crate.yml on kymostudio/kymostudio

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file kymostudio_core-0.3.3-cp310-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for kymostudio_core-0.3.3-cp310-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 552b08d71682bbffaf62476f1af45ee17117a858f0cc22a5025604fc5c888c55
MD5 cabd0451e8728bd464e24071007c0a17
BLAKE2b-256 ac60cd71495ab3dd02908a8fb74e82de0a51896a15489fb029606326a1ed7c68

See more details on using hashes here.

Provenance

The following attestation bundles were made for kymostudio_core-0.3.3-cp310-abi3-macosx_11_0_arm64.whl:

Publisher: release-crate.yml on kymostudio/kymostudio

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file kymostudio_core-0.3.3-cp310-abi3-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for kymostudio_core-0.3.3-cp310-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 b8e631b8bf4ded97c69a8c561ee5c2c8496bfd006cc04c3333b257e4794be2f4
MD5 bd2c06d3d9bb2da0ab1af4da1699a533
BLAKE2b-256 489f94ce75e989987cf7d7ca87989cd1b2f2cc9e92a8f06d16eac306466f75b1

See more details on using hashes here.

Provenance

The following attestation bundles were made for kymostudio_core-0.3.3-cp310-abi3-macosx_10_12_x86_64.whl:

Publisher: release-crate.yml on kymostudio/kymostudio

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page