8000 Investigate Rust Rules · Issue #12 · jachris/cook · GitHub
[go: up one dir, main page]

Skip to content

Investigate Rust Rules #12

Open
Open

Description

@jachris
No description provided.

Activity

  1. jachris commented on Aug 5, 2017

    @jachris
    OwnerAuthor

    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

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      0