-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Open
Description
Hi Philipp,
First, thank you so much for the excellent OS development series. I'm currently following the post-01 branch of blog_os, and wanted to report the steps required to successfully build the project on Apple Silicon Macs (ARM64).
Since this platform is increasingly popular among Rust developers, I believe this could help others avoid common pitfalls and build failures.
✅ Environment
- macOS 14.x (ARM64 / Apple Silicon)
- Homebrew-installed
llvmandld.lld - Rust nightly (
rustup update nightly) - Using
cargo build -Z build-std
🔧 Required Steps for post-01 on macOS ARM
- Install prerequisites:
rustup update nightly
rustup component add rust-src --toolchain nightly
brew install llvm- Create target file
aarch64-blog_os.json:
{
"llvm-target": "aarch64-unknown-none",
"target-endian": "little",
"target-pointer-width": "64",
"arch": "aarch64",
"os": "none",
"vendor": "unknown",
"linker-flavor": "ld.lld",
"linker": "/opt/homebrew/opt/llvm/bin/ld.lld",
"panic-strategy": "abort",
"disable-redzone": true,
"features": "+strict-align",
"executables": true
}
⚠️ Do NOT includedata-layout, or you'll hit a mismatch error when buildingcorewith-Z build-std.
- Use this command to build:
cargo +nightly build -Z build-std=core --target aarch64-blog_os.json💡 Suggestion
Would you consider adding a section in the README or a separate guide for macOS ARM builds? I’d be happy to contribute a PR if that’s helpful.
Thanks again for the awesome tutorials!
Metadata
Metadata
Assignees
Labels
No labels