4dsdev
Views: 604,284 Main | Rules/FAQ | Memberlist | Active users | Last posts | Calendar | Stats | Online users | Search 10-21-17 06:06 AM
Guest:

0 users reading Rust on 3DS | 1 bot

Main - Homebrew discussion - Rust on 3DS New reply


Furyhunter
Posted on 06-12-15 05:37 PM Link | #209
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
Posted on 06-13-15 05:17 PM Link | #210
Nice :) More options for homebrew development can't hurt.

Furyhunter
Posted on 06-23-15 11:09 AM Link | #236
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
Posted on 09-17-15 05:51 PM (rev. 2 of 09-17-15 07:20 PM) Link | #419
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 New reply

Page rendered in 0.024 seconds. (2048KB of memory used)
MySQL - queries: 26, rows: 69/69, time: 0.018 seconds.
[powered by Acmlm] Acmlmboard 2.064 (2015-10-07)
© 2005-2008 Acmlm, Xkeeper, blackhole89 et al.