vibe_code/lib.rs
1//! # VibeSystem: Simple Parallelism for Rust
2//!
3//! The `vibe-code` library, also known as the VibeSystem, provides an incredibly
4//! simple way to run your code in parallel. It's designed for developers who want to speed
5//! up their applications without getting bogged down in the complexities of manual thread
6//! management, channels, or async runtimes.
7//!
8//! The core idea is to take a list of tasks and run them all at once, intelligently
9//! distributing them across your CPU cores.
10//!
11//! # Key Components
12//!
13//! - **`VibeSystem`**: The main entry point. You create one of these and use it to run your jobs.
14//! - **`Job`**: A handle to a piece of work that is running in the background. You can call
15//! `.get()` on a `Job` to wait for its result.
16//! - **`collect`**: A helper function to wait for a `Vec<Job<T>>` to finish and get a `Vec<T>` of results.
17
18#![allow(dead_code)]
19#![allow(unused_imports)]
20
21use std::sync::{
22 Arc,
23 atomic::{AtomicUsize, Ordering},
24};
25
26// Internal modules that power the system.
27pub mod node;
28pub mod queue;
29pub mod signals;
30pub mod task;
31pub mod types;
32pub mod utils;
33pub mod vibe;
34pub mod vibe_code;
35
36// Re-exports for the public API.
37pub use task::{Priority, TaskError, TaskHandle};
38pub use types::NodeError;
39pub use vibe::{Job, VibeSystem, collect};
40pub use vibe_code::{UltraVibeBuilder, UltraVibeSystem};