Skip to content

Is it possible to also specify cargo.lock file? #157

@koddo

Description

@koddo

Hello. Would be great if Cargo.lock file could be generated and then specified as well in cli, besides Cargo.toml. Just to make sure a script is easily runnable in a few of years without any effort. I know I can unpack a script using --package and preserve the Cargo.lock from there, but a command line option would save time, when working with a lot of scripts.

Edit: I found two workarounds, which are not perfect, but they work: rust-script --pkg-path my-script my-script.rs creates a directory, and I can commit only Cargo.lock from it, or I can copy a my-script-Cargo.lock to the path printed by --package, which is something like /home/koddo/.cache/rust-script/projects/f92ab9238ceaf92893fbd. Still would be great to have a command line option.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions