Skip to content

naming: library crate "slint", binary crate "slint-cli", and the installed binary itself "slint" are three different names for two crates #307

Description

@MaximeGaudin

Summary

packages/core's crate is named slint; apps/cli's crate is named slint-cli but its [[bin]] section renames the produced executable to slint (apps/cli/Cargo.toml:7-9) — so cargo add slint pulls in an unrelated GUI toolkit (see the crates.io collision finding), cargo install slint-cli is the correct incantation but produces a binary called slint, and none of the three names match the others consistently.

Scope

  • Severity (reporter's assessment): low
  • Area: arch
  • Code: packages/core/Cargo.toml, apps/cli/Cargo.toml:1-9
  • Reproduced empirically: yes

Minimal reproduction

cat apps/cli/Cargo.toml shows:
[package]
name = "slint-cli"
...
[[bin]]
name = "slint"
path = "src/main.rs"
while packages/core/Cargo.toml shows [package] name = "slint" for the library [lib] name = "slint".

Expected

Once the library is renamed to resolve the crates.io collision (see the critical finding above), the binary crate name, the produced binary name, and the library crate name should be chosen so a new user's first cargo add <name> / cargo install <name> guess lands on the right artifact — e.g. binary crate and produced binary both slint-cli, or all three aligned under one unambiguous prefix.

Sources

  • No external source needed — direct comparison of the two Cargo.toml files

Notes

Low severity on its own (this pattern — crate name differs from binary name — is common and not inherently wrong, e.g. ripgrep's crate is ripgrep... producing binary rg), but combined with the crates.io collision above it compounds the discoverability problem for anyone trying to find or depend on the right artifact.


Filed as part of a systematic pre-release audit. Triage and de-duplication pending.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions