rtk-ai/rtk

Add rust-version to Cargo.toml (MSRV = 1.91)

Open

#1402 opened on Apr 19, 2026

View on GitHub
 (1 comment) (0 reactions) (0 assignees)Rust (48,085 stars) (2,914 forks)batch import
effort-smallenhancementgood first issue

Description

v0.37.1 uses str::floor_char_boundary() in src/cmds/system/pipe_cmd.rs:135, which was stabilized in Rust 1.91.0.

Without rust-version in Cargo.toml, building with Rust < 1.91 fails with a confusing error:

error[E0658]: use of unstable library feature `round_char_boundary`
 --> src/cmds/system/pipe_cmd.rs:135:21
  |
135 | let end = input.floor_char_boundary(end);
    |                 ^^^^^^^^^^^^^^^^^^^

Adding rust-version = "1.91" to [package] in Cargo.toml would give a clear error message at build time instead:

error: package `rtk v0.37.1` cannot be built because it requires rustc 1.91 or newer

This affects distribution packagers (e.g., Arch Linux AUR) where the system Rust version may lag behind.

Contributor guide