Skip to content

Add libc feature to enable crossterm's libc backend#1014

Merged
fdncred merged 3 commits intonushell:mainfrom
NiltonVolpato:main
Feb 7, 2026
Merged

Add libc feature to enable crossterm's libc backend#1014
fdncred merged 3 commits intonushell:mainfrom
NiltonVolpato:main

Conversation

@NiltonVolpato
Copy link
Contributor

This adds a libc feature that enables crossterm's libc feature, allowing reedline to work in environments where rustix's raw syscall approach fails.

Motivation

When running under x86 emulation (e.g., CheerpX/WebVM, QEMU user-mode), reedline fails with:

Reedline error: Invalid argument (os error 22)

The root cause is that rustix uses the TCGETS2 ioctl via raw syscalls, which some emulators don't implement. See:

Crossterm has a libc feature that uses libc's tcgetattr instead, which falls back to TCGETS and works in these environments.

Changes

  • Adds libc feature that enables crossterm/libc

Usage

reedline = { version = "...", features = ["libc"] }

Such that reedline can use crossterm with the libc feature.
@fdncred
Copy link
Contributor

fdncred commented Jan 20, 2026

Seems reasonable. Just need to get the CI green, which I think is because of the lock file not being included in the PR.

@fdncred
Copy link
Contributor

fdncred commented Feb 6, 2026

update the lock file and we'll be good to go. Is that something you can do @NiltonVolpato ?

@fdncred fdncred merged commit 6ca9550 into nushell:main Feb 7, 2026
6 checks passed
@fdncred
Copy link
Contributor

fdncred commented Feb 7, 2026

Thanks

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.

2 participants