Skip to content

Published crates declare no rust-version but require post-1.90 APIs (floor_char_boundary) — consumers get E0658 instead of a clean MSRV error #398

Description

@ohdearquant

Bug

The 0.3.0 crates on crates.io declare no rust-version, but at least khive-pack-brain requires a compiler newer than 1.90: src/persist.rs:388 calls str::floor_char_boundary, which is unstable on 1.90 (round_char_boundary feature).

Consumers building with an older toolchain therefore fail deep inside the dependency compile with a raw feature-gate error:

error[E0658]: use of unstable library feature 'round_char_boundary'
  --> khive-pack-brain-0.3.0/src/persist.rs:388

instead of cargo's clean up-front refusal ("package requires rustc X.Y or newer").

Hit in practice by a downstream Docker build whose builder image pinned rust:1.90-slim-bookworm: every local gate passed (host toolchain 1.94.1), then the container build failed at the dependency.

Suggested fix

Declare rust-version in [workspace.package] in crates/Cargo.toml and inherit it (rust-version.workspace = true) in every published crate. Set it to the true MSRV (the floor_char_boundary/ceil_char_boundary stabilization release, post-1.90; verify against the oldest toolchain that compiles the workspace). A CI job pinned to the declared MSRV would keep the declaration honest as dependencies move.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions