
Zig System Calls
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-codeInstalls 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 GitHubSponsors
Details
- Repository
- github.com/oven-sh/bun
- First seen
- Jun 3, 2026