๐ vibe-code โ Brain-Dead Simple Parallelism for Rust
For coders who just want things to work fast.
vibe-code is a dead-simple parallel execution engine for Rust that runs your functions on all CPU cores โ with no threads, no channels, and no async boilerplate.
Inspired by natureโs circulatory systems โ from ants to whales โ where the design is identical, only the scale changes. Your code should scale the same way.
โจ What Can You Do?
- Run heavy calculations in parallel โ compress files, process images, crunch numbers.
- Process large batches of data โ without your computer exploding.
- Make your code ridiculously fast โ with minimal changes.
๐ฏ Dead Simple Examples
Basic Parallel Work
use VibeSystem;
let system = new;
let job1 = system.run;
let job2 = system.run;
let job3 = system.run;
println!;
let compressed = job1.get;
let processed = job2.get;
let result = job3.get;
Batch Processing
let jobs = vec!;
let results = collect;
println!;
๐ฎ Real Examples
Video Processing
let system = new;
let frame_jobs: = video_frames
.into_iter
.map
.collect;
let filtered_frames = collect;
Web Scraping
let system = new;
let jobs = vec!;
let scraped_data = collect;
File Compression
let system = new;
for file in big_files
Speed Comparison
use ;
use ;
let system = new;
let start_time = now;
let jobs: =
.map
.collect;
println!;
let results = collect;
let duration = start_time.elapsed;
println!;
println!;
๐ง Setup
Add to your Cargo.toml:
[]
= "0.1.0"
Then use it:
use ;
That's it. No config. No setup hell.
๐ API Reference
VibeSystem
VibeSystem::new()โ Creates a new system.system.run(my_func, data)โ Runs a function with input data in parallel.system.go(my_func)โ Runs a function with no input.
Job
job.get()โ Waits for the job to finish and returns the result.job.peek()โ Checks if done without blocking. ReturnsSome(result)orNone.job.is_done()โ Returnstrueif the job is complete.
Utilities
collect(jobs)โ Waits forVec<Job<T>>to finish and returnsVec<T>.
๐จ Error Handling
This library is intentionally crash-first.
If a function in one of your jobs panics, your whole program will crash โ loudly โ with a helpful message. Thatโs on purpose.
โ Your job failed! Check your function for bugs.โ Job was cancelled - did you shut down the system?
No silent failures. No mysterious bugs. Fail fast. Fix fast.
๐ค When NOT to Use This
- For quick scripts โ Just run code normally.
- For a single small operation โ No point parallelizing one thing.
- If you need complex error handling โ vibe_code crashes on failure by design.
๐ก Philosophy
This library follows the "vibe coder" philosophy:
- โ It just works โ no setup hell.
- โ Fast by default โ uses all your CPU cores out of the box.
- โ Crash early โ better than bugs hiding in shadows.
- โ Zero learning curve โ if you can call a function, you can use this.
No threads. No channels. No async spaghetti. Just results.
โก Performance Snapshot
Processing 10 jobs (500ms each):
- Sequential: ~5 seconds
- With vibe_code: ~0.6 seconds
Tested on 12-core CPU.
๐ฏ Bottom Line
Your slow, sequential code:
for item in big_list
Becomes this:
let jobs: = big_list
.into_iter
.map
.collect;
let results = collect; // Fast, all at once
Same logic. Way faster. Zero complexity. Thatโs the vibe. ๐
Inspired by biology: ants and whales use the same circulatory system โ just scaled. vibe_code works the same way.