The docs describing cargo-free setup of crates_universe mention Cargo.Bazel.lock file:
crates_repository(
name = "crate_index",
lockfile = "//:Cargo.Bazel.lock",
packages = {
"async-trait": crate.spec(
version = "0.1.51",
),
"mockall": crate.spec(
version = "0.10.2",
),
"tokio": crate.spec(
version = "1.12.0",
),
},
render_config = render_config(
default_package_name = ""
),
)
The lockfile parameter is mandatory, but the doc does not explain how to create and maintain the Cargo.Bazel.lock file.
In the case of Cargo, Cargo.lock is automatically created and updated by cargo, no extra steps from users are required.