frus-core 0.3.0

frus — shared foundation types (geometry, colour)
Documentation
  • Coverage
  • 100%
    576 out of 576 items documented5 out of 5 items with examples
  • Size
  • Source code size: 632.7 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 6.9 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 7s Average build duration of successful builds.
  • all releases: 6s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • frus-rs/frus
    17 0 31
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • KalybosPro

frus-core

The vocabulary every other frus crate speaks: geometry, colour, paths, text styles, animation and the Scene a frame is drawn from.

Layer: Foundations, the bottom one. It has a single small dependency (bytemuck) and knows nothing about windows, GPUs or platforms. See ARCHITECTURE.md.

What you reach for

  • Scene and Primitive: the flat display list. Widgets push primitives into it and the renderer draws it, and nothing else crosses from one to the other.
  • Color, Rect, Size, Point, Insets: the value types every layer passes around.
  • AnimationController, Tween, Curve, SpringSimulation: time and physics, shared by every animated widget.

Example

use frus_core::{Color, Rect, Scene};

let mut scene = Scene::new();
scene.fill_rect(Rect::new(0.0, 0.0, 120.0, 40.0), Color::hex("#3B82F6"));
assert_eq!(scene.len(), 1);

Part of frus

Applications rarely name this crate: the frus facade and frus-widgets re-export the types above. See the workspace README. Licensed under MIT or Apache-2.0.