Skip to content

Document problems with multiple crossterm versions #876

Closed

Description

@joshka

It's possible to accidentally have two copies of crossterm with semver incompatible versions in an app / crate.

At a high level the known issues are:

  • Terminal draw queries window size and waits for an event - different versions have different event queues. If these are on different threads then this event can be raced
  • Enabling raw mode saves the cooked mode. Using a different version of crossterm than was used to save the cooked mode termios doesn't restore them correctly
  • Any widget that relies on a specific version of crossterm may attempt to pass values to methods with the same type name, but different version. This will fail to compile
  • Specific versions may make it difficult to upgrade widgets / ratatui versions unless everything is up to date

Mitigations

  • ratatui-core to be introduced in ratatui 0.30. Moves the backends out of the main lib and allows changes to backend code to evolve at different pace to main lib
  • feature flag backend versions to allow for different versions to be used. This sort of thing is fairly common when dealing with semver incompatible versions of libs that are generally code compatible.

Links from:

  • FAQ
  • Backends
  • ratatui-crossterm

Activity

  1. added this to the v0.30 milestone on Jul 9, 2025
  2. added a commit that references this issue on Dec 15, 2025
    67a7b0d
  3. added a commit that references this issue on Dec 26, 2025
    9523159
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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions