Repository navigation
Conversation
Semgrep Static Analysis
No issues found. |
Security Scan Summary
All security checks passed! |
Up to standards ✅🟢 Issues
|
Introduce comptime OS conditionals so OhmZ compiles and runs natively on macOS ARM64 without hardcoding Linux-only constants. - Create src/platform.zig centralizing IPPROTO_RAW, IP_HDRINCL, and MSG_DONTWAIT with correct values per OS (darwin vs linux) - Replace std.os.linux.geteuid() with inline ARM64 assembly (svc #0x80) on macOS, guarded by comptime builtin.os.tag check - Guard Linux-only ioctl TIOCGWINSZ in progress.zig behind comptime, defaulting to 80 columns on non-Linux platforms - Update tx.zig, rx.zig, os.zig, traceroute.zig to use platform module
Bulletdev
force-pushed
the
feat/macos-cross-platform
branch
from
November 21, 2026 23:08
e969d4a to
4beb077
Compare
Semgrep Static Analysis
No issues found. |
Security Scan Summary
All security checks passed! |
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
src/platform.zigmodule — centralizes all OS-specific socket constants (IPPROTO_RAW,IP_HDRINCL,MSG_DONTWAIT) withcomptimeconditionals for darwin vs linux, replacing direct use ofstd.posixnamespaces that don't exist on macOSgeteuid()via inline ARM64 assembly —std.os.linux.geteuid()is Linux-only; on macOS aarch64, usessvc #0x80syscall 25 (offset0x2000000 + 25) to check root privilegesioctlin progress bar —TIOCGWINSZviastd.os.linux.ioctlcaused "invalid system call" on macOS; now behindcomptime builtin.os.tag == .linuxwith fallback to 80 columnsFiles changed
src/platform.zigsrc/main.zigsrc/progress.zigsrc/tx.zigplatformmodulesrc/rx.zigplatformmodulesrc/os.zigplatformmodulesrc/traceroute.zigplatformmoduleTest plan
-Dtarget=aarch64-macos— builds clean-sT) runs on macOS ARM64 without root-sS) work on Linux with root🤖 Generated with Claude Code