Guides using bun.sys for system calls and file I/O in Zig. Use when implementing file operations instead of std.fs or std.posix.
The zig-system-calls skill facilitates the utilization of bun.sys for system calls and file I/O operations in the Zig programming language. This skill is designed to provide developers with a robust alternative to the standard libraries such as std.fs and std.posix, particularly when implementing file operations that require cross-platform compatibility and enhanced error handling. By leveraging bun.sys, developers can perform system-level operations with greater reliability and clarity, avoiding the pitfalls of traditional approaches that may not deliver consistent behavior across different operating systems.
You can use the bun.sys.File wrapper for most file operations, which provides a structured way to handle opening, reading, writing, and closing files.
Yes, bun.sys offers full support for Windows with a libuv fallback, making it suitable for cross-platform development.
bun.sys returns a Maybe(T) type with detailed error information, while std.fs/std.posix uses a generic error union. Additionally, bun.sys handles EINTR automatically, whereas std.fs/std.posix requires manual handling.
Quick Setup:
.claude/skills/Repository
oven-sh/bun