A Zig-inspired build-time evaluation primitive, exposed as Vite and Rolldown plugins
Comptime is a plugin for Vite and Rolldown that evaluates pure functions at build time and replaces the calls with their serialized results for optimization.
How It Works
You hear about a handy tool that pre-calculates heavy math or logic in your web project so everything runs faster for visitors.
Simply include this speed tool in your project's setup files with a quick addition.
In your code, use a special note to tell the tool exactly what numbers or results to figure out ahead of time.
Run your usual build process, and the tool quietly computes and swaps in the final values.
Open the built files and watch as your complex calculations turn into simple, ready numbers.
Your app now loads and works super quickly, delighting users with instant results.
Star Growth
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 RepurposeSimilar repos coming soon.