Crate grimoire_css_lib

Source
Expand description

Core library module that orchestrates the core functionality of the Grimoire CSS system engine.

This module provides two main functions:

  • start - Pure function that executes core CSS processing logic
  • start_in_memory - Function for processing CSS in memory without file I/O
  • start_as_cli - CLI wrapper with logging and user feedback (spinners, colors), it is not idiomatic for a typical Rust library because it introduces side effects and depends on console/UI crates. Use it only if you specifically want the same CLI behavior outside of the main binary (e.g. in a Node.js wrapper or CLI application).

Choose start for library usage and start_as_cli for CLI applications.

Modules§

core
The core module contains the essential building blocks of the Grimoire CSS system.

Statics§

FAILURE
INFO
SPINNER
SUCCESS

Functions§

get_logged_messages
Public function to read the saved messages from the buffer. This function is accessible from the main.rs (or any other crate/binary) for reading the buffer content.
start
Starts the Grimoire CSS system based on the given mode, without performing any CLI-specific side effects.
start_as_cli
A convenience function that simulates CLI behavior (timing, logging, spinner) but is placed in the library crate to avoid duplicating code in multiple binaries or wrappers.
start_in_memory