chara 0.2.0

Parser for layered character definition files
Documentation
  • Coverage
  • 100%
    11 out of 11 items documented1 out of 4 items with examples
  • Size
  • Source code size: 7.51 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 1.68 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 12s Average build duration of successful builds.
  • all releases: 10s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • porky11/chara
    0 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • porky11

Chara

crates.io docs.rs

A lightweight parser for layered character definitions using a simple line-based format.

Format

[internal_name] [optional_display_name]
- [variant_name] [image_path]
- [variant_name] [image_path]
- None  # Disables layer

Usage

Add to your project:

[dependencies]
chara = "0.1"

Basic parsing:

use chara::CharacterDefinition;

let input = r"
base
- Default: base.png

expression: Mood
- Happy: happy.png
- Sad: sad.png
";

let def = CharacterDefinition::parse(input);

Features

  • Zero dependencies
  • First variant is default
  • Empty path disables layer
  • Preserves declaration order