[rust-dev] How to build multiple .rs source files?

Niko Matsakis niko at alum.mit.edu
Tue Apr 10 06:28:57 PDT 2012


On 4/10/12 5:56 AM, Amitava Shee wrote:
> Just to confirm my understanding - rustc deviates from the gcc way of 
> generating object files and linking them together without first 
> packaging them into libraries.

We prefer to say "improves upon", but yes. =)

> Is there a way to compile and link several .rs files into a single 
> executable without an intermediate library?

There is no need for an intermediate library.  A .rc file can directly 
produce an application.  There is, however, no way to link together 
multiple .rs files without an .rc file.

Niko


More information about the Rust-dev mailing list