Codebase quality improvements + more node api compt#29
Merged
Conversation
8bc6231 to
d8cec56
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Large feature branch adding Node.js API compatibility, async I/O, and HTTP server improvements. 100 files changed, ~7800 lines added across 6 commits.
Interactive installer
install.shrewritten with interactive y/n prompts, toolchain verification (llvm, clang, cmake), and automatic shell profile detection (~/.bashrc, ~/.zshrc, etc.)HTTP server (picohttpparser + lws-bridge rewrite)
bench/) for HTTP and WebSocket throughput vs Node, Bun, Go, and CNode.js API compatibility
Major push to match Node.js standard library surface area:
child_process module (sync + async)
child_process.execSync(cmd)— popen-based, returns stdout stringchild_process.spawnSync(cmd, args?)— fork/exec with separate stdout/stderr pipeschild_process.exec(cmd)— async viauv_queue_work, returnsPromise<{stdout, stderr, status}>child_process.spawn(cmd, args?, onStdout, onStderr, onExit)— streaming callbacks viauv_spawnchild-process-bridge.c, always linked) and async (child-process-spawn.c, conditionally linked with libuv)Async filesystem
fs.readFile(path)andfs.writeFile(path, data)returning Promises viauv_queue_workAsyncFsGeneratorwith shared%FsWorkContextstruct for all async fs/cp operationsPromise improvements
Promise.allSettled(),Promise.any(),Promise.finally()PromiseGeneratorand extractedpromise-handlers.tssub-modulePath module expansion
path.extname(),path.isAbsolute(),path.normalize(),path.parse(),path.relative()Date module
new Date()constructor,Date.now(), instance methods (.getTime(),.toISOString(),.toLocaleDateString(), etc.)Math module expansion
Math.random(),Math.sign(),Math.trunc(), trig functions (sin,cos,tan,asin,acos,atan,atan2)Crypto module
crypto.randomUUID()via OpenSSL'sRAND_bytesConsole
console.time()/console.timeEnd()/console.timeLog()viauv_hrtimeconsole-timers.tssub-moduleArray methods
findIndex(),indexOf(),reverse(),shift(),unshift(),sort(),splice()array/reorder.ts,array/search.ts,array/sort.ts,array/splice.tsString methods
padEnd()Set methods
Set.delete(),Set.clear(),Set.forEach()fs module
fs.copyFileSync(),fs.renameSync()CI fixes
child-process-bridge.oandchild-process-spawn.oto release artifact packaging and vendor verification in all 3 build jobs (linux-musl, linux-glibc, macos)Architecture
console.ts,promise-handlers.ts,string-methods.tsreorder.ts,search.ts,sort.ts,splice.tsasync-fs.ts,child-process.ts,console-timers.ts,date.ts,promise.tsTest plan
cp-execsync,cp-bare-execsync,cp-spawnsync,cp-spawnsync-shell,cp-exec-async,cp-spawn,fs-readfile-async,fs-writefile-async,fs-copyfile,fs-rename,promise-allsettled,promise-any,promise-finally,date-instance,crypto-uuid,console-time,path-extname,path-isabsolute,path-normalize,path-parse,path-relative,math-random,math-sign,math-trig,math-trunc,array-findindex,array-indexof,array-reverse,array-shift-unshift,array-sort,array-splice,set-delete,string-padend