Skip to content

Commit

Permalink
doc: add lockfile-path unstable doc section
Browse files Browse the repository at this point in the history
  • Loading branch information
Ifropc committed Aug 18, 2024
1 parent ba8b394 commit ec347d9
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions src/doc/src/reference/unstable.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,8 @@ Each new feature described below should explain how to use it.
* Registries
* [publish-timeout](#publish-timeout) --- Controls the timeout between uploading the crate and being available in the index
* [asymmetric-token](#asymmetric-token) --- Adds support for authentication tokens using asymmetric cryptography (`cargo:paseto` provider).
* Mafinest and lockfile
* [lockfile-path](#lockfile-path) --- Allows to specify a path to lockfile other than the default path `<workspace_root>/Cargo.lock`.
* Other
* [gitoxide](#gitoxide) --- Use `gitoxide` instead of `git2` for a set of operations.
* [script](#script) --- Enable support for single-file `.rs` packages.
Expand Down Expand Up @@ -1625,6 +1627,23 @@ will prefer the value in the configuration. The allows Cargo to add new built-in
path bases without compatibility issues (as existing uses will shadow the
built-in name).

## lockfile-path
* Original Issue: [#5707](https://github.com/rust-lang/cargo/issues/5707)
* Tracking Issue: [#14421](https://github.com/rust-lang/cargo/issues/14421)

This feature allows you to specify the path of lockfile Cargo.lock.
By default, lockfile is written into `<workspace_root>/Cargo.lock`.
However, when sources are stored in read-only directory, most of the cargo commands
would fail, trying to write a lockfile. The `--lockfile-path`
flag makes it easier to work with readonly sources.
Note, that currently path must end with `Cargo.lock`. Meaning, if you want to use
this feature in multiple projects, lockfiles should be stored in different directories.
Example:

```sh
cargo +nightly metadata --lockfile-path=$LOCKFILES_ROOT/my-project/Cargo.lock -Z unstable-options
```

# Stabilized and removed features

## Compile progress
Expand Down

0 comments on commit ec347d9

Please sign in to comment.