Skip to content

ref(cargo): Extract common items to workspace#969

Open
szokeasaurusrex wants to merge 1 commit intomasterfrom
szokeasaurusrex/package
Open

ref(cargo): Extract common items to workspace#969
szokeasaurusrex wants to merge 1 commit intomasterfrom
szokeasaurusrex/package

Conversation

@szokeasaurusrex
Copy link
Member

@szokeasaurusrex szokeasaurusrex commented Feb 3, 2026

Extract all common package items, which can be extracted, to the workspace Cargo.toml, except for the version field.

Note on version

We cannot extract version because it causes a parse error when generating the crate README.md files while bumping the version prior to release, as the cargo-readme tool we use to generate these files apparently cannot parse version = { workspace = true }, as it expects version to be set to a string.

@Dav1dde, do you have any suggestions for how to get around this? I think the way forward may be to simply stop using cargo readme, as our README files are quite verbose. Instead, I would propose having a short static README for each crate, directing users interested in full docs over to our docs.rs pages. What do you think?

In any case, this should happen in a separate PR.

@Dav1dde
Copy link
Member

Dav1dde commented Feb 3, 2026

I assume it will also not accept the shorthand: <dep>.workspace = true.

There is an issue in the cargo-readme repo which links to https://crates.io/crates/cargo-rdme which apparantely works with workspace dependencies, possibly also an option?

Not familiar overall with the release process etc, but your suggestion also makes sense to me.

@szokeasaurusrex
Copy link
Member Author

szokeasaurusrex commented Feb 3, 2026

There is an issue in the cargo-readme repo which links to https://crates.io/crates/cargo-rdme which apparantely works with workspace dependencies, possibly also an option?

cargo-rdme has inferior support for intradocs links; I have already tried it out. Some links that compile as expected in cargo-readme don't work in cargo-rdme.

imho it would be simplest just to keep the README minimal and have the docs.rs page be the main source for more comprehensive documentation

@szokeasaurusrex
Copy link
Member Author

I assume it will also not accept the shorthand: <dep>.workspace = true.

I will double-check this

@Dav1dde
Copy link
Member

Dav1dde commented Feb 3, 2026

imho it would be simplest just to keep the README minimal and have the docs.rs page be the main source for more comprehensive documentation

Totally fair!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants