charton 0.5.0

A high-performance, layered charting system for Rust, featuring a flexible data core and multi-backend rendering.
Documentation
name: Rust CI

on:
  push:
    branches: [ "main" ]
  pull_request:
    branches: [ "main" ]

env:
  CARGO_TERM_COLOR: always
  CARGO_INCREMENTAL: 0
  # Set debuginfo to 0 (none) to minimize memory usage during linking
  RUSTFLAGS: "-C debuginfo=0"

jobs:
  build_and_test:
    name: Build and Test
    runs-on: ubuntu-latest

    steps:
      - name: Checkout code
        uses: actions/checkout@v4

      - name: Set up Rust
        uses: dtolnay/rust-toolchain@stable
        with:
          components: clippy, rustfmt

      - name: Rust Cache
        uses: Swatinem/rust-cache@v2

      - name: Check formatting
        run: cargo fmt --all -- --check

      - name: Build Library
        # Adding --lib ensures we only build the core library first, 
        # avoiding the heavy linking of examples.
        run: cargo build --lib --verbose

      - name: Run tests
        # Adding --lib only runs unit tests inside src/. 
        # If you have a tests/ folder, use --tests instead of --examples.
        run: cargo test --lib --tests --verbose

      - name: Lint with Clippy
        # Again, focus only on the library and tests to save memory
        run: cargo clippy --lib --tests -- -D warnings