Why is there no default x86_64-unknown-none target?

When I run rustc --print target-list, I see embedded targets for many architectures (e.g. riscv, aarch64) but not x86_64. Why not x86_64?

I'm working on adding support to the Nix package manager for cross-compiling Rust projects to embedded platforms, as part of a project to integrate Nix with Redox OS. This would be much easier to do if Rust had a default configuration for embedded x86_64 that I could later override with a custom target JSON.

I'm here to both help and learn. If desired, I'd be happy to contribute code to Rust adding a default embedded x86_64 target configuration :slight_smile:

1 Like

From what I remember the problem here is that 'bare bones x86' is ill-defined. Do you want to write an UEFI? BIOS? a bootloader? an operating system?
For embedded targets it's usually more clear.

Some people are starting to write Linux kernel modules in Rust, have you looked at that? E.g. (just found by a quick search) https://github.com/tsgates/rust.ko#build-targets