crossterm-rs / crossterm

Cross platform terminal library rust
MIT License
3.18k stars 274 forks source link

Use rustix instead of libc (additive only approach) #892

Closed joshka closed 3 months ago

joshka commented 4 months ago

This is an purely additive alternative approach to #878. Instead of modifying the code paths that were hitting libc, this version instead adds feature gated additions (one path for not(libc), one for libc).

Closes: #847

joshka commented 4 months ago

There's still probably going to be a few things to clear up based on the various OS tests for this that run in CI.

notgull commented 4 months ago

It looks like libc is still in use in the event handling part of some backends, as part of signal handling (which rustix does not handle).

notgull commented 4 months ago

(If you want help, add me to your forked repo and I will make changes)

joshka commented 4 months ago

I can't add you right now (on my phone), but I wouldn't mind a hand with working out the more difficult of the two problems - what to do with the stream to fd conversion (sigwinch is the easy one). I'll take a look tomorrow sometime if you don't get it first.

joshka commented 4 months ago

Changed in latest:

@notgull what do you think of this fix?

joshka commented 4 months ago

@TimonPost This is probably good to have your 👀 on it now.