Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Investigate Rust Rules #12

Open
jachris opened this issue Aug 3, 2017 · 1 comment
Open

Investigate Rust Rules #12

jachris opened this issue Aug 3, 2017 · 1 comment

Comments

@jachris
Copy link
Owner

jachris commented Aug 3, 2017

No description provided.

@jachris
Copy link
Owner Author

jachris commented Aug 5, 2017

It seems like it would be nice to integrate Cargo directly into the build. There is a related discussion going on at rust-lang/rust-roadmap-2017#12.

There are a many ways to do this. Without changes to the current code one might create a rule that executes cargo with CARGO_TARGET_DIR=<random temp dir> and move the produced files to the build directory. This however means that the entire project must be rebuilt every time there is a change, since the cargo state is deleted afterwards.

I came up with two solutions:

  • Zip the entire cargo directory and unzip it when rebuilding. The published inputs would then be every file of the given directory containing the sources and cargo files. Expected outputs would probably be specified explicitly and copied after building.
  • Just let cargo keep its state in the intermediate directory and resolve Handle unknown output filenames #7 by allowing not only output files, but output directories. These would be analyzed by Cook after the build and their state would be recorded to ensure correctness.

There is another problem related to cargo downlading the crates. This could be resolved by specifying the version of dependencies in Cargo.toml explicitly (using = x.y.z).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant