Configure Cargo.toml for packaging #195

Open
opened 2020-08-06 16:56:29 +00:00 by gburd · 0 comments
gburd commented 2020-08-06 16:56:29 +00:00 (Migrated from github.com)

There are some tricky bits to this:

Firstly, we need to exclude fixtures, the CLI, and anything else that doesn't belong in libmentat.

Secondly, we need to figure out what to do about sub-crates. We mostly use our sub-crates for build efficiency, and to allow for configurations like clients that don't include sync code, or sync systems that don't include querying. But sub-crates need to be on crates.io!

error: failed to verify package tarball

Caused by:
  no matching package named `mentat_core` found (required by `mentat`)
location searched: registry `https://github.com/rust-lang/crates.io-index`
version required: ^0.0.1

It's possible to get cargo package to complete without this, but doing so produces a package that doesn't include its dependencies, and sadness ensues.

Perhaps it's enough to put Git URLs here instead of just paths?

Beyond this, we need to put more thought into packaging:

  • mozilla-central landing. Dependencies.
  • Optimization settings.
  • Dead code elimination, particularly pub things across module boundaries. Narrow down exports.
There are some tricky bits to this: Firstly, we need to [exclude fixtures](https://doc.rust-lang.org/cargo/reference/publishing.html#packaging-a-crate), the CLI, and anything else that doesn't belong in `libmentat`. Secondly, we need to figure out what to do about sub-crates. We mostly use our sub-crates for build efficiency, and to allow for configurations like clients that don't include sync code, or sync systems that don't include querying. But sub-crates need to be on crates.io! ``` error: failed to verify package tarball Caused by: no matching package named `mentat_core` found (required by `mentat`) location searched: registry `https://github.com/rust-lang/crates.io-index` version required: ^0.0.1 ``` It's possible to get `cargo package` to complete without this, but doing so produces a package that doesn't include its dependencies, and sadness ensues. Perhaps it's enough to put Git URLs here instead of just paths? Beyond this, we need to put more thought into packaging: - mozilla-central landing. Dependencies. - Optimization settings. - Dead code elimination, particularly `pub` things across module boundaries. Narrow down exports.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: greg/mentat#195
No description provided.