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>
Showing
crates/next-cli/Cargo.toml
0 → 100644
crates/next-cli/src/main.rs
0 → 100644
packages/next/bin/next
0 → 100755
packages/next/bin/next.cmd
0 → 100644
Please
register
or
sign in
to comment