oven-sh avatar

Zig System Calls

oven-sh/bunOfficial

This guides you through bun.sys, Bun's alternative to std.fs and std.posix for file operations and system calls. You'll want this when working on Bun internals or extensions, since it handles cross-platform differences better (especially Windows via libuv) and returns detailed error info beyond just errno. The Maybe(T) pattern takes some getting used to, but you get automatic EINTR retry and can see exactly which syscall failed with what path. Main gotcha: don't use it for sockets, use uws.Socket instead. Start with bun.sys.File for normal file ops, drop to low-level functions only when you need specific control.

skills.sh installs
147
GitHub stars
96.7K
last updated
Aug 21, 2026

Install

$ npx -y skills add oven-sh/bun --skill zig-system-calls --agent claude-code

Installs into .claude/skills of the current project.

Files

This guides you through bun.sys, Bun's alternative to std.fs and std.posix for file operations and system calls. You'll want this when working on Bun internals or extensions, since it handles cross-platform differences better (especially Windows via libuv) and returns detailed error info beyond just errno. The Maybe(T) pattern takes some getting used to, but you get automatic EINTR retry and can see exactly which syscall failed with what path. Main gotcha: don't use it for sockets, use uws.Socket instead. Start with bun.sys.File for normal file ops, drop to low-level functions only when you need specific control.

Browse the repository on GitHub

Sponsors

Details

Repository
github.com/oven-sh/bun
First seen
Jun 3, 2026

More from oven-sh/bun

All 2

Recommended

1juliusbrussee avatarcavemanjuliusbrussee/cavemanUltra-compressed communication mode. Cuts output tokens 65% (measured) by speaking like caveman while keeping full technical accuracy. Supports intensity levels618.3Kskills.sh installs
2mattpocock avatargrill-memattpocock/skillsA relentless interview to sharpen a plan or design.1.5Mskills.sh installs
3shadcn avatarimproveshadcn/improveSurvey any codebase as a senior advisor and produce prioritized, self-contained implementation plans for OTHER models/agents to execute. Strictly read-only on s40Kskills.sh installs
4obra avatarsystematic-debuggingobra/superpowersUse when encountering any bug, test failure, or unexpected behavior, before proposing fixes326.7Kskills.sh installs
5forrestchang avatarkarpathy-guidelinesforrestchang/andrej-karpathy-skillsBehavioral guidelines to reduce common LLM coding mistakes through explicit assumptions, simplicity, and verifiable success criteria.17.9Kskills.sh installs
6vercel-labs avatarfind-skillsvercel-labs/skillsHelps users discover and install agent skills when they ask questions like "how do I do X", "find a skill for X", "is there a skill that can...", or express int4.3Mskills.sh installs