Views: 1,609,264 | Main | Rules/FAQ | Memberlist | Active users | Last posts | Calendar | Stats | Online users | Search | 11-21-24 12:24 PM |
Guest: |
0 users reading Rust on 3DS | 1 bot |
Main - Homebrew discussion - Rust on 3DS | Hide post layouts | New reply |
Furyhunter |
| ||
Newcomer a curried function Level: 5 Posts: 1/3 EXP: 305 Next: 224 Since: 06-12-15 Last post: 3352 days ago Last view: 2241 days ago |
I spent this week trying to get Rust code running on a 3DS, and it's been mostly successful.
Basically, you just need to tell rustc/cargo to use a particular llvm target, linker and archiver to build any package that doesn't depend on libstd. If you want libstd support, you need system-specific implementation of some of its functionality. But, libcore provides a platform-independent subset of libstd, which is what is used in my ctrulib binding, ctru-rs. It's heavily incomplete but exposes a large number of functions via a raw submodule, and has a few basic idiomatic wrappers around things. Unfortunately, LLVM still emits calls to compiler-rt symbols, so I am working on a solution for that at the moment. I figured that it might interest those who come to this forum. A sample project I am working on can be found here.. |
profi200 |
| ||
Member Who knows? Level: 19 Posts: 11/70 EXP: 34507 Next: 1270 Since: 05-21-15 From: Germany Last post: 2992 days ago Last view: 2860 days ago |
Nice More options for homebrew development can't hurt. |
Furyhunter |
| ||
Newcomer a curried function Level: 5 Posts: 2/3 EXP: 305 Next: 224 Since: 06-12-15 Last post: 3352 days ago Last view: 2241 days ago |
Does anyone know how to cross-compile compiler-rt, the llvm companion library that provides implementations of instructions not available on each platform? The documentation for llvm is so piss poor I can't find how to build just for the host platform, let alone cross compile. |
Furyhunter |
| ||
Newcomer a curried function Level: 5 Posts: 3/3 EXP: 305 Next: 224 Since: 06-12-15 Last post: 3352 days ago Last view: 2241 days ago |
New project template: https://github.com/Furyhunter/rust3ds-template
Everything works. Follow the instructions to set up your environment. Everything _except_ libstd works. You get: core, collections, rustc_unicode, alloc, so basically everything important from libstd except threads and unwinding support. |
Main - Homebrew discussion - Rust on 3DS | Hide post layouts | New reply |
Page rendered in 0.011 seconds. (2048KB of memory used) MySQL - queries: 28, rows: 71/71, time: 0.006 seconds. Acmlmboard 2.064 (2018-07-20) © 2005-2008 Acmlm, Xkeeper, blackhole89 et al. |