Crate vibe_code

Source
Expand description

§VibeSystem: Simple Parallelism for Rust

The vibe-code library, also known as the VibeSystem, provides an incredibly simple way to run your code in parallel. It’s designed for developers who want to speed up their applications without getting bogged down in the complexities of manual thread management, channels, or async runtimes.

The core idea is to take a list of tasks and run them all at once, intelligently distributing them across your CPU cores.

§Key Components

  • VibeSystem: The main entry point. You create one of these and use it to run your jobs.
  • Job: A handle to a piece of work that is running in the background. You can call .get() on a Job to wait for its result.
  • collect: A helper function to wait for a Vec<Job<T>> to finish and get a Vec<T> of results.

Re-exports§

pub use task::Priority;
pub use task::TaskError;
pub use task::TaskHandle;
pub use types::NodeError;
pub use vibe::Job;
pub use vibe::VibeSystem;
pub use vibe::collect;
pub use vibe_code::UltraVibeBuilder;
pub use vibe_code::UltraVibeSystem;

Modules§

node
Defines VibeNode, a self-contained processing unit.
queue
Implements VibeQueue, a thread-safe, bounded queue for tasks.
signals
Defines unique identifiers and system-wide signals for communication.
task
Defines the core Task abstraction and related components.
types
Defines common error types and statistics-tracking structures.
utils
Provides utility functions for timing and random number generation.
vibe
The user-facing “vibe” interface.
vibe_code
Provides UltraVibeSystem, the core task scheduling and execution engine.