dmop

dmop / puru

Public

A thread pool for JavaScript with Go-style concurrency primitives. Works on Node.js and Bun.

16
0
100% credibility
Found Apr 05, 2026 at 16 stars -- GitGems finds repos before they trend. Get early access to the next one.
Sign Up Free
AI Analysis
TypeScript
AI Summary

Puru is a JavaScript library that brings Go-style concurrency tools like channels, groups, and spawners to run CPU-heavy tasks off the main thread easily without complex setup.

How It Works

1
🔍 Discover speed booster

You're building an app that slows down on heavy calculations, and you find a simple tool that runs tough jobs in the background to keep things snappy.

2
📦 Add it easily

You bring the tool into your project with a quick step, and it's ready to use right away.

3
🚀 Offload heavy work

You wrap your slow math or data crunching function in one easy line, and it magically runs on a helper without blocking your app.

4
Run many jobs together

You start several big tasks at once, like processing images or numbers, and let them work in parallel.

5
Wait for results

Your app stays responsive while the helpers finish, and you collect all the answers when ready.

🎉 App flies fast

Now your app handles huge workloads smoothly, feels super quick, and your users are thrilled.

Sign up to see the full architecture

4 more

Sign Up Free

Star Growth

See how this repo grew from 16 to 16 stars Sign Up Free
Repurpose This Repo

Repurpose is a Pro feature

Generate ready-to-use prompts for X threads, LinkedIn posts, blog posts, YouTube scripts, and more -- with full repo context baked in.

Unlock Repurpose
AI-Generated Review

What is puru?

Puru brings Go-style concurrency primitives to JavaScript via a thread pool that runs on Node.js and Bun. Developers spawn CPU or I/O tasks off the main thread using channels for communication, WaitGroups and ErrGroups for batching, select for multiplexing, and contexts for cancellation -- all in one file, no separate worker scripts or message plumbing. It keeps event loops responsive for data crunching, image processing, or API fan-outs.

Why is it gaining traction?

Raw worker_threads force manual pooling, serialization, and error handling; puru abstracts it with ergonomic APIs like spawn(fn) for instant parallelism and task(fn) for reusable workers. Benchmarks deliver 2-4x speedups on CPU workloads (Fibonacci, primes, matrices) and 73x on concurrent async tasks, measured on M1 hardware. Zero deps, TypeScript types, and cross-runtime support hook JS devs craving Go's thread github projects simplicity.

Who should use this?

Node.js backend engineers handling CPU-heavy ETL, video encoding, or simulations where main-thread blocking kills perf. Bun users building high-throughput servers with producer-consumer pipelines. Skip if you're doing frontend or sub-5ms tasks -- overhead bites there.

Verdict

At 16 stars and 1.0% credibility, puru feels pre-mainstream but packs mature docs, benchmarks, and 80%+ test coverage -- production-ready for niches like purus plastics-scale data jobs. Adopt if worker boilerplate drags you down; watch for wider adoption.

(198 words)

Sign up to read the full AI review Sign Up Free

Similar repos coming soon.