Releases: aymanbagabas/uncurses
Release list
v0.0.3
uncurses is a Rust library for building terminal user interfaces. It gives you a direct, framework-free way to draw to the terminal and read input — you own every cell and your own event loop, whether you run inline, take over the full screen, or mix the two.
A diffing renderer that redraws only what changed, Unicode-aware width, truecolor styling with automatic downsampling, hyperlinks, and typed keyboard, mouse, and paste input. It asks the terminal what it supports instead of looking it up in a terminfo database, so the same code runs on Linux, macOS, and Windows.
[dependencies]
uncurses = "0.0.3"Using ratatui? uncurses-ratatui provides a backend.
Guides, concepts, and API reference: uncurses.org
Upgrading from 0.0.2
Screen splits into Program and Screen. Program owns the terminal, input, and modes; Screen is now Screen<W: Write> and only draws. Reach the renderer with program.screen() / screen_mut().
let mut program = Program::stdio()?; // was Screen::stdio()
let mut program = Program::open()?; // was Screen::open()ScreenOptions becomes ProgramOptions. In uncurses-ratatui, UncursesBackend::screen / screen_mut become program / program_mut, and try_read_event returns io::Result<Option<Event>>.
Startup no longer queries the terminal. ScreenOptions::query_capabilities is gone; nothing is probed unless you ask for it. Call program.query_capabilities(&[]) when you want discovery. Reading an event no longer writes either, so refresh the inline origin yourself with program.request_origin().
Capabilities records what the terminal replied instead of a fixed set of booleans. capabilities() returns &Capabilities, and the public fields are now accessors:
| 0.0.2 | 0.0.3 |
|---|---|
caps.mouse_sgr_pixel |
caps.supports(Mode::MOUSE_SGR_PIXEL) |
caps.synchronized_output |
caps.supports(Mode::SYNCHRONIZED_OUTPUT) |
caps.grapheme_clusters |
caps.supports(Mode::UNICODE_CORE) |
caps.in_band_resize |
caps.supports(Mode::IN_BAND_RESIZE) |
caps.kitty_keyboard |
caps.kitty_keyboard().is_some() |
caps.true_color |
program.screen().color_profile() == Profile::TrueColor |
caps.sixel, caps.clipboard, da_attribute |
read caps.primary_device_attributes() |
The last row is the one to look at twice. Those accessors picked two numbers out of the Primary DA reply and searched the whole parameter list for them, but the first parameter is the terminal's architectural service class, not a capability: a VT132 answers CSI ? 4 ; 6 c, and the old code read that leading 4 as Sixel support. Read the class first, then decide what the numbers after it mean.
Event::Termcap carries entries: Vec<(String, Option<String>)> instead of a single payload: String, so a multi-entry XTGETTCAP reply no longer needs unpacking by hand. DECRQSS replies are no longer folded in with it and arrive as Event::SettingReport.
Env is a read-only trait. A process environment is live, not fixed. ProcessEnv reads through to the real environment on every lookup, EnvList answers from a fixed ordered list, and Terminal stores a Box<dyn Env> so either works without a type parameter.
BEL terminates OSC only. DCS, APC, PM, and SOS now require ST, per ECMA-48, and a byte in 0x80..=0x9F is treated as C1 only at a character boundary. Input that relied on BEL closing a DCS parses differently.
Changelog
Breaking changes
- Split Screen into a renderer and a Program facade
- Stop querying the terminal behind the caller's back
- Split Screen into a renderer and a Program facade (#25)
- Report DECRPSS separately and keep XTGETTCAP entries structured (#37)
- Store terminal replies in Capabilities, not booleans
- Drop Capabilities::true_color
- Rename da_attribute, drop sixel and clipboard
- Report Primary DA without interpreting it
- Make Env a read-only trait (#33)
- Make tokenizing linear in the length of a line (#14)
Bug Fixes
- Reset the pen before a newline that can scroll (#39)
- Repaint when the width mode changes
- Keep the origin correct across fullscreen and bursts
- Repaint when leaving fullscreen, not only entering
- Observe each event once, and stop the docs asking for twice
- Let poll_event take a shared borrow, and correct three docs
- Hold unread events instead of re-observing them
- Scale mouse pixels across the grid, not by a truncated cell
- Report DECRPSS separately and keep XTGETTCAP entries structured (#37)
- Never adopt a mode over the application's own choice
Documentation
- Correct the claims the purity refactor invalidated
- Correct what capability replies actually apply
- Say that the reported cell size can go stale
- Capabilities fill from any reply, not only query_capabilities
- Stop claiming Terminal.app support is recorded
- Count three
prefer_*fields, not two - Restructure the Program page and drop absence-based prose (#31)
- List the features uncurses supports (#43)
Features
- Adopt grapheme clusters and in-band resize on discovery
- Record every reply the terminal sends about itself
- Expose the terminal and its environment snapshot (#27)
- Complete DECRQSS and DECRPSS support (#29)
- Report terminal visibility (DEC 2033) (#11)
Miscellaneous Tasks
- List breaking changes in the release notes
Performance
- Make tokenizing linear in the length of a line (#14)
Refactor
- Drop tool-branded comment markers (#35)
- Split Screen into a renderer and a Program facade
- Stop querying the terminal behind the caller's back
- Split Screen into a renderer and a Program facade (#25)
- Store terminal replies in Capabilities, not booleans
- Drop Capabilities::true_color
- Rename da_attribute, drop sixel and clipboard
- Report Primary DA without interpreting it
- Make Env a read-only trait (#33)
Styling
- Satisfy the lints stable 1.98 added (#40)
Testing
- Gate the piped read on unix
v0.0.2
uncurses is a Rust library for building terminal user interfaces. It gives you a direct, framework-free way to draw to the terminal and read input — you own every cell and your own event loop, whether you run inline, take over the full screen, or mix the two.
A diffing renderer that redraws only what changed, Unicode-aware width, truecolor styling with automatic downsampling, hyperlinks, and typed keyboard, mouse, and paste input. It asks the terminal what it supports instead of looking it up in a terminfo database, so the same code runs on Linux, macOS, and Windows.
[dependencies]
uncurses = "0.0.2"Using ratatui? uncurses-ratatui provides a backend.
Guides, concepts, and API reference: uncurses.org
Changelog
Bug Fixes
- Point Examples nav at the GitHub examples directory
- Skip the website deploy for pull requests from forks
- Apply raw mode to each half of a split terminal
- Restore the terminal even when teardown fails
- Accept EINVAL for a non-terminal descriptor on Solaris
- Require a libc that implements Debug for its structs
- Reset LNM on every raw-mode entry
- Build the delay checks on platforms without TABDLY/BSDLY
- Gate apply_line_discipline to unix/windows
- Truncate per row instead of ending the whole paint
- Treat CRLF as a line break in the literal paint path
- Return early when the start row is below the clip
- Repaint after color profile changes (#21)
- Make resize a no-op when the size is unchanged (#24)
Documentation
- Clarify how uncurses replaces terminfo
- Report task_picker progress to the terminal
Features
- Expose the saved state and re-export libc
- Report progress with OSC 9;4
- Derive TABS/BS/ONLCR from the host line discipline
Miscellaneous Tasks
- Lead release notes with an intro and fold the changelog
- Publish the workspace in one pass
Refactor
- Name the Windows state halves like the Unix ones
- Grant TABS/BS on raw-mode entry instead of deriving them
Testing
- Prime pty attributes instead of assuming a platform default
- Skip the pty helper where the slave is not a terminal
v0.0.1
uncurses is a Rust library for building terminal user interfaces. It gives you a direct, framework-free way to draw to the terminal and read input — you own every cell and your own event loop, whether you run inline, take over the full screen, or mix the two.
A diffing renderer that redraws only what changed, Unicode-aware width, truecolor styling with automatic downsampling, hyperlinks, and typed keyboard, mouse, and paste input. It asks the terminal what it supports instead of looking it up in a terminfo database, so the same code runs on Linux, macOS, and Windows.
[dependencies]
uncurses = "0.0.1"Using ratatui? uncurses-ratatui provides a backend.
This is the first release, so expect the API to move before 0.1.
Guides, concepts, and API reference: uncurses.org
Changelog
Bug Fixes
- Correct two test expectations for Windows
- Tighten CSI decoder matching for private/intermediate/param length
- Preserve source cursor row across inline shrinks
- Emit underline colors in ITU T.416 colon form
- Honor WT_SESSION on Windows when TERM is unset
- Land reset cursor at last-rendered bottom, not live height
- Store Style hyperlink behind Arc
- Advance sync_front by cell width
- Decode Kitty event types for non-CSI-u keys
- Force cursor reassert after invalidate
- Tee input at fd read site instead of parse()
- Compare Key by code and modifiers only
- Canonicalize Tab+Shift to BackTab in normalize
- Gate shifted_key text auto-pop on shift state
- Only apply CAPS_LOCK as shifted layer for ASCII letters
- Treat CAPS_LOCK as shifted layer for any cased letter
- Lowercase ASCII letters in C1 introducer fallback
- Align win32 input mode with normalize rules
- Exclude lock states from Key equality and hash
- Error on leading
+and clarifymatcheslock-state docs - Make Key::normalize public so intra-doc links resolve
- Keep UTF-8 glyphs intact in wire dumps
- Fall back to input fd for window size
- Detect TrueColor when CI is set
- Build kevent from a zeroed value
- Disable color for an explicit dumb TERM everywhere
- Trace synthesized input bytes on windows
- Use the select poller on the generic unix fallback
- Accept in-band resize reports without pixel fields
- Stop tab planner overshooting past the last stop
- Drop the async event stream on finish and pause
- Honor DECRPM permanent states in capability detection
- Emit the hyperlink opener from Style::write after the SGR
- Restore landing page spacing and rebrand the footer
- Make API reference links root-absolute
- Re-anchor inline cursor on resume to stop eating lines
- Paint task_picker's SGR strings through a Painter
- Drain pending query replies on teardown to stop shell bleed
- Emit no escapes for empty styled spans
- Correct Windows raw mode console flags
- Gate test-only decoder helpers to test builds
- Reset pointer shape with "default" not empty OSC 22
- Resolve clippy lints on unix paths
- Preserve wide cell style when broken into blanks
- Drop redundant borrow in assert formatting
- Drain in-band resize echo to stop shell bleed
- Chain to the displaced SIGWINCH handler
Documentation
- Add README
- Add MIT license
- Deduplicate CapsLock paragraph in normalize
- Clarify single-char parse path accepts literal
+ - Sized constructor and crate stdio in quick-start doctests
- Add compositional terminal example
- Add capability-probe example for the query API
- Expand capabilities into a colorful capability report
- Correct the Copy claim on Single
- Illustrate the managed area for fullscreen and inline
- Probe capabilities across the execution × method matrix
- Add terminal fundamentals and tutorial guides
- Polish READMEs in a human voice
- Add image to README for output illustration
- Show querying a terminal by hand
- List supported terminal features
- Note uncurses runs on other unix-like systems
- Document character widths and the ambiguous policy
- Expand crate, module, and Screen rustdoc
- Add use-case examples to module docs and a low-level demo
- Document remaining public items and ratatui crate quick start
- Add module-level examples to color, buffer, cell, and ansi
- Add styling and terminal-query examples
- Add input-only, draw-only, offscreen, mouse, and async examples
- Add bracketed-paste and truecolor-gradient examples
- Add pause/resume and paste-spilling examples
- Drive the styles example with Style open/close sequences
- Overhaul READMEs and guides for the current API and examples
- Clarify Screen starts inline with the cursor visible
- Link the README taste to the repo and set the inline example to one row
- Comprehensive rustdoc with ASCII diagrams across the API
- Slim package READMEs to point at the docs site
- Add the documentation website
- Showcase Style::new() in README and website snippets
- Correct the output buffering and flushing description
- Use screen.render() in the README quick start
- Rebuild the Concepts section from scratch
- Fix stale source-doc references after the recent API changes
- Slim the READMEs down to pointers to the website
- Center Mermaid diagrams
- Clarify the Terminals intro
- Make grid figures use 1-based rows and columns
- Reframe layers by use case and call uncurses a terminal toolkit library
- Rebuild the Getting Started section
- Drop the Explanations section
- Add Guides section and Color concept page
- Audit and proofread pass across all pages
- List the unicode module in the module map
- Use set_color_profile in the color guide
- Flag the advanced ScreenOptions transport knobs
- Use ansi::color in the querying guide
- Fix stale references after the Display alternate-flag change
- Drop the removed bench feature from the feature table
- Update mouse guide for the MouseTracking bitflags API
- Correct the diff module overview
- Drop the anstyle crate reference from the styling guide
- Fix KittyKeyboardFlags import path
- Fix broken intra-doc links in the non-async build
- Clarify KeyCode::Space is distinct from Char(' ')
- Revamp READMEs and point at uncurses.org
- Document Display for Key emits structural spelling
- Observe events after reads and add async_screen
- Add uncurses agent skill
- Uniform pure-read contract, opt-in observe, trim internals
- Show surface width methods
- Note Screen is Send + Sync
- Add image sources for dark and light themes in README
- Replace website links with usage sections
- Reword name origin, drop em dashes
- Add website hints to readmes
- Document inline click mapping
- Rewrite intro, add example GIFs, size inline quickstart
- Use alternate screen in the quickstart examples
- Wait for a keypress in the quickstart examples
- Unwrap example GIFs from anchor links
- Update image sources in README.md
- Link all README badges to their targets
- Update images in README with new picture tags
Features
- Import terminal rendering library source
- Expose scroll region ops on SurfaceMut
- Implement ratatui Backend over Screen
- Port ratatui examples to the uncurses backend
- Add space starfield demos
- Add Windows poll backend and unify wait via Poller
- Drop inline viewport support
- Support color scheme update notifications (DEC 2031)
- Add five demo examples
- Move cursor to last row at the start of reset
- Add blink and rapid_blink builders
- Add tour demo showcasing styles and hyperlinks
- Add modal and modal_inline demos
- Detect Windows Terminal for iTerm2 inline images
- Tee output from Screen::flush
- Track default colors and kitty keyboard flags
- Auto-populate Key::text for printable Char codes
- Add cursor_pad scratch-pad example
- Canonicalize key event representation across decoders
- Canonicalize Key Display output
- Parse Key and KeyCode from string
- Add KeyCode::function checked constructor
- Tighten Key string syntax to a single separator
- Display PageUp/PageDown/Escape in full
- Accept
pgdownas PageDown alias - Name minus/equals/plus in Display and accept aliases
- Add Key::matches and Key::matches_any
- Make Unicode backend opt-in via features
- Size-required constructors, config builders, present()
- Add read_matching and try_read_matching to the event source
- Add query module for terminal request/reply helpers
- Add composable Terminal device handle
- Suspend and resume keylog and screen_toggle
- Add async EventStream behind the async feature
- Convert file_explorer to async EventStream and tokio
- Add Style::write and Style::write_styled
- Support fds beyond FD_SETSIZE in the Darwin select backend
- Add in-band resize (DEC 2048) support
- Add EventSource resize-delivery toggle for in-band mode
- Add cursor bookkeeping helpers
- Owned-stack backend with inline viewport support
- Add read_clipboard query
- Add Display, styled(), and StyledText for Style
- Implement Display for ColorScheme
- Implement Display for ModeSetting
- Add from_terminal constructor
- Add string and grapheme width helpers
- Add a god-Screen facade over terminal, canvas, and input
- Add capability detection, terminal modes, and options
- Add async events, text trait, and port examples
- Add hex/hsl constructors and to_hex/to_hsl conversions
- Request pixel mouse only when SGR-pixel is supported
- Accept Option in color setters and adopt across examples
- Emit OSC 8 hyperlink from write_styled when a link is set
- Add Screen::with_canvas constructor
- Add Encode trait to serialize a surface to escape sequences
- Add set_str_truncate with a styled tail indicator
- Convert Option<Style> into Style, mapping None to EMPTY
- Reset hardware tab stops on init when TABS is on
- Make insert_above self-contained
- Stage per-frame cursor and add atomic frame toggle
- Add clear_cursor_position, accept bare tuples in set_cursor_position
- Add OSC 0/1/2 title controls
- Treat an empty title as clearing the override
- Pure Screen event reads and async event streaming
- Pure backend event reads with opt-in observe
- Add pointer_shape hyperlink hover demo
- Use...