Rust: Add RISC-V support

Created on 17 Jun 2016  路  10Comments  路  Source: rust-lang/rust

I want to add RISC-V support for Rust. I'd be happy to fork it and add this feature if I could pointed in the right direction of what files I'd need to edit?

The RISC-V foundation has already added support for Go, so I felt porting this language would provide a good alternative.

Thank you for your help!

Most helpful comment

FYI, I have an experimental port available at pkmx/rust. It is based on LLVM patches from lowRISC/riscv-llvm.

All 10 comments

You should ask for them (RISC-V people) to upstream their LLVM changes. With that we should pretty much support RISC-V without any extra changes on our side.

Done.

Ah yeah, we'd totally be on board for any new platforms! You may want to glance at some historical portings of Rust which tend to be small-ish patches that involve updating various pieces of the standard library and compiler to understand the new architecture. It's generally pretty unlikely that any major changes are necessary to support a new architecture, and PRs are of course always welcome!

We don't tend to keep around issues for tracking new platforms like this, so I'm gonna close this for now, but feel free to ask any questions here or elsewhere!

What is the status of RISC-V support in Rust, currently?

There isn't any

FYI, I have an experimental port available at pkmx/rust. It is based on LLVM patches from lowRISC/riscv-llvm.

Is there any chance to use this for the HiFive1 board (i.e. RV32IMAC)?

@starblue You should have a look at https://github.com/dvc94ch/riscv-rust-toolchain.

@PkmX do you have a link to the changes you had to make to Rust for your port? I could not see any other branches or identify commits in the repo you linked to.

Now that llvm supports RISCV out of the box I am looking forward to compiling Rust for rv64imafdc but don't have a good idea where to start.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Mark-Simulacrum picture Mark-Simulacrum  路  681Comments

nikomatsakis picture nikomatsakis  路  331Comments

withoutboats picture withoutboats  路  202Comments

aturon picture aturon  路  417Comments

nikomatsakis picture nikomatsakis  路  236Comments