Search code examples
cross-platformrust

Building a cross-architecture application (using Rust)


I started to learn Rust programming language and I use Linux. I'd like to build a cross-platform application using this language.

The question might not be related to Rust language in particular, but nonetheless, how do I do that? I'm interested in building a "Hello World" cross-platform application as well as for more complicated ones. I just need to get the idea.

So what do I do?

UPDATE:

What I want to do is the ability to run a program on 3 different platforms without changing the sources. Do I have to build a new binary file for each platform from the sources? Just like I could do in C


Solution

  • The best way to figure this out is to download the source code for Servo and explore it on your own. Servo is absolutely a cross-platform codebase, so it will have to address all of these questions, whether they be answered in build/configuration files, or the Rust source itself.