Expand description
π¬ Termcinema SDK β Programmatic SVG renderer for cinematic terminals
This crate exposes the SDK layer of termcinema as a reusable Rust API.
Itβs designed for integrations beyond CLI, with a pure functional interface that avoids all I/O.
π§ Use this crate if you want to:
- Embed terminal-style animations into WASM apps or GUI frontends πΈ
- Build Python bindings or other FFI-based scripting integrations π
- Render SVGs in TUI playgrounds, editors, or pipelines π§ͺ
- Treat the CLI layer as optional and just use the core logic π
Β§β¨ Features
- β Stateless rendering (pure functions, no side effects)
- π¨ Full control over style, layout, themes, and animation
- π§© Based on
termcinema-engine, with layout and theme adapters - π§± Designed for sandboxed runtimes like WASM, FFI, embedded
Β§π Quick Start
use termcinema_cli::{CliArgs, render_svg_direct};
let args = CliArgs {
theme: Some("retro_tty".into()),
..Default::default()
};
let svg = render_svg_direct("echo Hello", &args).unwrap();
assert!(svg.contains("<svg"));See CliArgs for all customization options and usage patterns.
StructsΒ§
- CliArgs
- Style, layout, theme, and animation configuration.
Defines all command-line options for the
termcinemabinary.
FunctionsΒ§
- available_
theme_ names - Lists all built-in theme names. Return the names of all built-in themes.
- default_
args - Returns a default
CliArgsinstance. Return default arguments for internal use or SDK initialization. - render_
svg_ direct - Renders SVG output from raw text and configuration. SDK-friendly rendering entrypoint.