Support macOS on Apple Silicon (aarch64-apple-darwin)

Open
#1 3 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
48/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Active
Tech stack
rust
Domain
build-system

Research direction

Start with crates/hir-ty/src/mir/codegen.rs and trace how the Cranelift ISA and object format are selected; then inspect the harness linker arguments. Check how the existing x86-64 SysV calling convention and symbol naming are handled. Done means the daemon and harness support Apple Silicon macOS, including Mach-O symbols and a linker option that works on Apple's linker.

Written by the indexing model from the issue text.

Description

rustd only targets x86-64 Linux. The Cranelift ISA is hard-coded to x86_64-unknown-linux-gnu in crates/hir-ty/src/mir/codegen.rs, so neither the daemon nor the harness runs on an Apple Silicon Mac. That leaves out a big share of Rust developers.

Rough scope:

  • Pick the Cranelift ISA from the host triple (aarch64-apple-darwin).
  • Emit Mach-O objects with Apple's _ symbol prefix.
  • Add the AArch64 C calling convention next to the x86-64 SysV one.
  • Replace -Wl,--allow-multiple-definition in the harness. Apple's linker does not support it.
Dominant language
Rust
Stars
248
Forks
13
Avg merge
7h 52m
Merged PRs (30d)
5

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from DioxusLabs/rustd

All issues in DioxusLabs/rustd

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.