Is it possible to compile Rust to Xbox Series X|S?

I'm interested in doing development for the Xbox using Rust. I haven't been able to find any resources on how this might be done (Probably because there happens to be a game named Rust). Does anyone have any ideas on how to achieve this?

I found these threads:

4 years old:

Recent: Building 3rd-tier targets so Rustup/Cargo can use them?


Seems like UWP target is your best bet.

Using the most popular search engine and put quotes around every word gives better search results, if you didn't already know. I searched for "compile" "rust" "xbox".

I was able to at least compile code that ran on an Xbox, in the form of a Godot addon. The key was two things:

  1. The .cargo/config that statically linked msvcrt.dll. I know this doesn't work everywhere, and there may be a better way to do it--I think UWP uses a different DLL for the C++ runtime, for instance. But that at least got it working.
  2. The fact that the UWP app entrypoint was provided by Godot. I'm not sure how to achieve the same in Rust. I'm guessing it's more complicated than fn main() {} but I haven't hit upon the right series of keywords to find how to make a UWP entrypoint from scratch. Microsoft just documents how to do it with existing runtimes that already provide one.

I don't recall making the UWP target work actually working out--that was my thread linked in the post. Ultimately my game ran on the Xbox fine for a minute or two, then locked up the console so hard that even the Xbox button couldn't get me back to the home screen. If someone figures this out then I'd be thrilled--have always wanted to run my games on consoles, and Xbox seems like my best bet.

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.