[rust-dev] Compiling Rust programs with the Meson build system

Corey Richardson corey at octayn.net
Wed Jun 18 15:21:10 PDT 2014

Hey Jussi,

Very cool! Always happy to see tools with Rust support :) As to file
names, do you know about `rustc --crate-file-name`?

On Wed, Jun 18, 2014 at 3:17 PM, Jussi Pakkanen <jpakkane at gmail.com> wrote:
> Hi
> I'm working on a build system called Meson
> (https://jpakkane.github.io/meson/) and I figured I'd add native Rust
> support. Here's what a build definition for a simple Rust application ended
> up looking:
> -----
> project('rustproject', 'rust')
> executable('rustprog', 'prog.rs')
> ----
> This gives you all the features you'd expect such as different build types
> (debug/release/etc), accurate dependency tracking via --dep-info, unit
> tests, install targets and so on. Shared library support is there, but I
> need to first fix one issue before it will actually work. This has to do
> with the fact that you can't know beforehand what the output file name will
> be (if you set it manually with -o, rustc will not link against it).
> If you want to try it our yourself, here's the steps:
> - check out Meson's git trunk: https://github.com/jpakkane/meson
> - cd into it, mkdir buildtest
> - ./meson.py test\ cases/rust/1\ basic buildtest
> - cd buildtest
> - ninja (or ninja-build if you are on Fedora)
> Test 2 does not work because of the above mentioned issue, so you probably
> don't want to run it.
> Feel free to try it out. If you have any questions I'm happy to answer them.
> _______________________________________________
> Rust-dev mailing list
> Rust-dev at mozilla.org
> https://mail.mozilla.org/listinfo/rust-dev


More information about the Rust-dev mailing list