I'm trying to publish GitHub - project-machine/puzzlefs to crates.io and it fails to build due to missing files in the package. Here is my library's structure:
cargo package -l only shows the top level
None of the directories
reader are included.
The project builds successfully with
Are there any files inside the missing directories? If there are rust files, are they referenced with
mod foo; somewhere?
You could try setting the
include field in the Cargo.toml The Manifest Format - The Cargo Book
I see you have additional Cargo.toml files in there. I don't think that'll work as-is. Think about whether you want those published separately to crates.io. It's probably better to rewrite those as simple sub-modules instead.
If the folders contain sub-crates, they must each be published separately.
There are two crates in there, but I'm only trying to package puzzlefs-lib.
cargo-package -l's output is from the
I actually forgot to delete the
Cargo.toml files when I reorganized the repository:
This is mentioned in The Manifest Format - The Cargo Book
Regardless of whether `exclude` or `include` is specified, the following files are always excluded:
* Any sub-packages will be skipped (any subdirectory that contains a `Cargo.toml` file).
* A directory named `target` in the root of the package will be skipped.