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

Amitava Shee amitava.shee at gmail.com
Tue Apr 10 07:56:28 PDT 2012


Thanks.

For those still in baby step phase, I have the most rudimentary project in
github -
https://github.com/ashee/rust-babysteps

Please note that <name_of_project>.rc implicitly references
<name_of_project>.rs that contains the main() entry point.

-Amitava

On Tue, Apr 10, 2012 at 9:28 AM, Niko Matsakis <niko at alum.mit.edu> wrote:

> 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
>



-- 
Amitava Shee
Software Architect

There are two ways of constructing a software design. One is to make it so
simple that there are obviously no deficiencies; the other is to make it so
complicated that there are no obvious deficiencies. The first method is far
more difficult.
-- C. A. R. Hoare The Emperor's Old Clothes, CACM February 1981
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/rust-dev/attachments/20120410/0eff3c08/attachment.html>


More information about the Rust-dev mailing list