Adding a new binary crate

I have added a new library crate and a binary crate

rlsl and librlsl

I added them in the Cargo.toml

How do I actually build and run my new binary crate?

➜  rust git:(master) ✗ ./x.py build -i src/rlsl --stage 1 --keep-stage 0
Updating submodules
    Finished dev [unoptimized] target(s) in 0.0 secs
Warning: no rules matched /home/maik/projects/rust/src/rlsl.
Build completed successfully in 0:00:01

What does this mean? Warning: no rules matched /home/maik/projects/rust/src/rlsl.

I have looked at rust/src/bootstrap at master · rust-lang/rust · GitHub

Adding a new compiler crate? Look no further! Adding crates can be done by adding a new directory with Cargo.toml followed by configuring all Cargo.toml files accordingly.

Did I miss something obvious?

After some digging it seems that I have to implement my own Assembler?

Okay I sort of got it working by adding a new binary in the rustc crate.

And then I updated compiler.rs accordingly. And I compile it with

./x.py build -i src/rustc --stage 1 --keep-stage 0

Sadly a simple change in librlsl triggers a full recompile for rustc which takes around 6min. What I really want to is to have a separate binary crate. Is that possible?

Otherwise I probably try use the compiler as a library with a pinned nightly.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.