Please add instructions on how to add an architecture

Open
#173 17 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
50/100
Issue type
Documentation
Clarity
Mostly clear
Activity status
Stale
Tech stack
rust
Domain
documentation

Research direction

Start by tracing how existing architectures are added in rustix and linux-raw-sys, including the bindgen workflow mentioned in the issue. Document the prerequisites, commands, and architecture-specific steps so a newcomer can reproduce the process and understand what completion looks like.

Written by the indexing model from the issue text.

Description

We're in the process on adding support for new architectures to the Rust compiler with the help of rustc_codegen_gcc.

As a first candidate, we want to get the m68k architecture working which has an LLVM backend which is not 100% feature-complete and has some issues when trying to build the Rust compiler for m68k. Thus, we want to give it a try with rustc_codegen_gcc.

Now, to get the backend working, we need to add m68k support in rustix and linux-raw-sys. While I have experience adding architecture support to the libc crate, I'm not sure how to add architecture support to these two crates. It seems that one has to run bindgen to generate the bindings, but there doesn't seem to be any easy to follow manual for it.

Could you please add instructions on how to add a new architecture so that new contributors don't have to figure this out by trial and error?

Dominant language
Rust
Stars
71
Forks
63
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

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 sunfishcode/linux-raw-sys

All issues in sunfishcode/linux-raw-sys

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.