You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
perf(cli): single-process dev server with Rust CLI wrapper
Replace fork-based architecture with single Node.js process:
- Add Rust CLI wrapper (`crates/next-cli/`) that handles:
- NODE_OPTIONS (memory limits, source maps, inspect)
- WATCHPACK_WATCHER_LIMIT for large projects
- Restart loop (exit code 77) without Node.js overhead
- Simplify next-dev.ts: remove fork(), IPC, child process management
- Simplify start-server.ts: remove NEXT_PRIVATE_WORKER handling
- Add shell entry points (bin/next, bin/next.cmd) that:
- Use native binary when available (~10ms overhead)
- Fall back to Node.js entry point
- Add lazy loading for heavy modules:
- tar (download-swc) - only needed for fallback download
- edge-runtime sandbox - only needed for edge functions
- MCP SDK - only needed when clients connect
- Set up cross-platform release pipeline:
- Build @next/cli-* for 8 platforms in CI
- Publish as optional dependencies
- Update install-native.mjs for development
Saves ~35-50ms on dev server startup by eliminating parent
Node.js process and fork overhead.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
0 commit comments