NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
crates.io · #859 most downloaded on crates.io
An easy to use library for building beautiful tables with automatic content wrapping
Last release 12 days ago
25 Sep 2026
Release timing varies
gaps range from 9 days to 7 months
Most releases are documented
notes for 42 of 47 stable releases
Nothing withdrawn
no release was ever pulled
7 years old
48 releases · first in 2020
One column per quarter.
chore: Release comfy-table version 8.0.1
chore: Release comfy-table version 8.0.1
The following types and functions have been removed:
The following types and functions have been removed:
TableComponent enummodifiers module and Table::apply_modifier have been removed.Table::current_style_as_presetTable::set_styleTable::styleTable::remove_styleTable::load_presetThe positional preset string format has been replaced with the new TableStyle, LineStyle and ContentLineStyle types.
The old approach of having "stringified" presets was too finicky and also implicitly bound to the order of variants in the old TableComponent enum.
It was just not a good design.
The new design, in comparison, has a nice and (hopefully) intuitive API to define a style.
On top of that, all functions on TableStyle are const, so custom styles can still be declared as constants:
const MY_STYLE: TableStyle = TableStyle::new()
.top_border(LineStyle::new('┌', '─', '┬', '┐'))
.header_lines(ContentLineStyle::new('│', '┆', '│'))
.header_separator(LineStyle::new('╞', '═', '╪', '╡'))
.content_lines(ContentLineStyle::new('│', '┆', '│'))
.bottom_border(LineStyle::new('└', '─', '┴', '┘'));The new API looks as follows:
comfy_table::presets::* are now TableStyle constants.Table::load_style(style) has been added to load a preset or custom style.Table::style() and Table::style_mut() to get a handle to the style used by the table.mut handle can be used to change the style.TableStyle::with_rounded_corners/TableStyle::with_solid_inner_borders.TableStyle, LineStyle and ContentLineStyle are public:
table.style_mut().top_border.left = Some('╭');The default truncation indicator is now … instead of ....
This should make it more obvious that there's more text and consumes less visual space.
Various performance improvements that reduce table formatting time quite a bit:
17µs -> 11µs253µs -> 172µs20.8ms -> 6.15msMost of these improvements boil down to:
Fixed a non-critical bug that resulted in less-than optimal layouting when UTF-8 characters were involved.
No longer panic when rendering a Table that contains a row with Row::max_height(0).
Don't print multi-width truncation indicators, if they would be longer than the column.
Fixed an edge-case, where multiple LowerBoundary constraints weren't uphold.
0x0 sized tty-environments. !186chore: Release comfy-table version 7.2.1
chore: Release comfy-table version 7.2.1
0x0 sized tty-environments. !186Switch to Rust 2024 edition. This bumps the MSRV to 1.85 and thereby no longer supports the wasm32-wasi target .
1.85 and thereby no longer supports the wasm32-wasi target.Handle UTF-8 graphemes when truncating cells. #167
unicode-segmentation library in the scope of #167 and #168.Bump crossterm to 0.28 on Windows as well
crossterm to 0.28 on Windows as well[7.1.2] - 2024-11-24 Chore Bump crossterm to 0.28 Bump unicode-width to 0.2
crossterm to 0.28unicode-width to 0.2Fix string width calculation with ANSI escape sequences by switching to the ansi-str crate. The previous implementation didn't respect OSC 8 hyperlink
Add helper methods (col,row)_count and is_empty . The first set of methods return the number of columns and rows respectively. The method is_empty ret
Fix a panic when working with extreme paddings, where (padding.left + padding.right) > u16::MAX .
(padding.left + padding.right) > u16::MAX.(content_width + padding) > u16::MAX.1 char, but the column_max_content_widths function on the table returned a 0 width for fully empty columns.However, this is also a opt-in to potential breaking changes on minor/patch versions.
The Color and Attribute enum are no longer re-exported from crossterm by default.
Previously, when updating comfy-table, crossterm needed to be upgraded as well, since the compile would otherwise fail due to type incompatibilities.
To fix this, these enums are now mirrored and internally mapped to their crossterm equivalents, which allows us to safely bump crossterm whenever a new version is released. This change will only affect you if your projects explicitly use crossterm and comfy-table at the same time and feed crossterm's native types into comfy-table.
If one wants the old behavior for convenience reasons, this can be enabled via a feature flag. However, this is also a opt-in to potential breaking changes on minor/patch versions.
Bump minimum version to v1.64
reexport_crossterm feature flag to enable old crossterm re-export.Add support for custom ansi styling inside of cells. This feature is hidden behind the feature flag custom_styling. Implemented by blueforesticarus in
custom_styling. Implemented by blueforesticarus in #93.add_row[s]_if, which filtering of rows by a predicate. Implemented by Techassi in #106.New preset ASCII_FULL_CONDENSED #97
ASCII_FULL_CONDENSED #97Disable unneeded crossterm bracketed-paste feature.
bracketed-paste feature.Table::row_iter no longer requires a &mut self, but only &self.
Table::row_iter no longer requires a &mut self, but only &self.Fixed an issue where dynamic arrangement failed when setting the table to the exact width of the content #90.
Table::column_iter no longer requires a &mut self, but only &self.table.content_arrangement.Add Table::add_rows to add multiple rows at the same time.
Table::add_rows to add multiple rows at the same time.v0.24Add Table::style_text_only(), which prevents non-delimiter whitespaces in cells to be styled.
Table::style_text_only(), which prevents non-delimiter whitespaces in cells to be styled.Table::discover_columns function and add info on when to use it to Row::add_cell.Cell::get_content -> Cell::contentColumn::get_padding_width -> Column::padding_widthColumn::get_constraint -> Column::constraintTable::get_header -> Table::headerTable::get_table_width -> Table::widthTable::set_table_width -> Table::set_widthTable::set_style -> Table::styleTable::get_column -> Table::columnTable::get_column_mut -> Table::column_mutTable::get_row -> Table::rowTable::get_row_mut -> Table::row_mutColumn::get_max_width and Column::get_max_content_width have been removed as we cannot guarantee that these numbers are always correct.
Use Table::column_max_content_widths insteadTable::column_max_content_widths now performs a full scan of the table's content when called.Table::is_tty, Table::force_no_tty and Table::should_style if tty feature isn't enabled.Nothing published for this version
All dependencies have been bumped.
All dependencies have been bumped.
stderr for is_tty check #25.ASCII_HORIZONTAL_BORDERS_ONLY in favor of ASCII_HORIZONTAL_ONLY.UTF8_HORIZONTAL_BORDERS_ONLY in favor of UTF8_HORIZONTAL_ONLY.tty feature flag, which enables tty related functionality. This includes styling and terminal-width detection. The tty feature flag is enabled by defa
Add modifiers::UTF8_SOLID_INNER_BORDERS, which makes the inner borders solid lines: │─ by ModProg for #39.
modifiers::UTF8_SOLID_INNER_BORDERS, which makes the inner borders solid lines: │─ by ModProg for #39.presets::ASCII_BORDERS_ONLY_CONDENSED, which is ASCII_BORDERS_ONLY but without spacing between rows #43.ASCII_HORIZONTAL_BORDERS_ONLY to ASCII_HORIZONTAL_ONLY. Old imports will still work until v5.0.UTF8_HORIZONTAL_BORDERS_ONLY to UTF8_HORIZONTAL_ONLY. Old imports will still work until v5.0.Some docstrings on the ColumnConstraint and Width enum were wrong.
ColumnConstraint and Width enum were wrong.Add Table::lines, which returns an iterator over all lines of the final table output by dmaahs2017 for #35.
Table::lines, which returns an iterator over all lines of the final table output by dmaahs2017 for #35.ColumnConstraints::Boundaries{lower: Width, upper: Width} to specify both an upper and a lower boundary.None for Table::get_table_width, if getting the terminal size somehow failed.enum ColumnConstraints {
...,
/// Enforce a absolute width for a column.
Absolute(Width),
/// Specify a lower boundary, either fixed or as percentage of the total width.
LowerBoundary(Width),
/// Specify a upper boundary, either fixed or as percentage of the total width.
UpperBoundary(Width),
}
pub enum Width {
/// Specify a min amount of characters per line for a column.
Fixed(u16),
/// Set a a minimum percentage in respect to table_width for this column.
/// Values above 100 will be automatically reduced to 100.
/// **Warning:** This option will be ignored, if the width cannot be determined!
Percentage(u16),
}
Instead of the old
enum ColumnConstraints {
...,
Width(u16),
MinWidth(u16),
MaxWidth(u16),
Percentage(u16),
MinPercentage(u16),
MaxPercentage(u16),
}
Remove most custom traits and replace them with std's generic From trait. \ Check the docs on the trait implementations for Cell, Row and Cells
From trait. Cells type, to allow super generic Iterator -> Row conversions.DynamicFullWidth arrangement. This mode is basically the same as the Dynamic arrangement mode, but it will always use the full available width, even i
DynamicFullWidth arrangement.
This mode is basically the same as the Dynamic arrangement mode, but it will always use the full available width, even if there isn't enough content to fill the space.This is considered a breaking change, since this can result in different table layouts!!
Dynamic arrangement
A new logic to optimize space usage after splitting content has been added.
If there is a lot of unused space after the content has been arranged, this space will now be redistributed to the remaining columns.
Or it will be removed if there are no other columns.
This is considered a breaking change, since this can result in different table layouts!!
This process is far from perfect, but the behavior is better than before.
Old behavior:
+-----------------------------------+-----------------------------------+------+
| Header1 | Header2 | Head |
+==============================================================================+
| This is a very long line with a | This is text with a | smol |
| lot of text | anotherverylongtexttesttest | |
+-----------------------------------+-----------------------------------+------+
New behavior:
+-----------------------------------------+-----------------------------+------+
| Header1 | Header2 | Head |
+==============================================================================+
| This is a very long line with a lot of | This is text with a | smol |
| text | anotherverylongtexttesttest | |
+-----------------------------------------+-----------------------------+------+
Old behavior:
+------------------------------------------------+
| Header1 |
+================================================+
| This is text with a |
| anotherverylongtexttesttestaa |
+------------------------------------------------+
New behavior:
+-------------------------------+
| Header1 |
+===============================+
| This is text with a |
| anotherverylongtexttesttestaa |
+-------------------------------+
Add the NOTHING preset, which prints no borders or lines at all.
NOTHING preset, which prints no borders or lines at all.Add table::trim_fmt, which trims all trailing whitespaces on tables with no right border.
table::trim_fmt, which trims all trailing whitespaces on tables with no right border.Nothing published for this version
Nothing published for this version
Allow to set custom delimiters on tables, columns and cells.
ToRow, ToCell and ToCells.New ColumnConstraint for hiding columns
Add the option to set a max-height on rows. Long content will be truncated.
A simple update of all dependencies.
Move is_tty logic from atty to crossterm.
is_tty logic from atty to crossterm.skeptic, since it fails in CI and bloats compile time. Compile time is reduced by ca. 40%.The project has been in use for quite some time and seems to be quite stable!
example functionality for examples.Column::get_max_width(), which returns the character count of the widest line in this column including padding.
Column::get_max_width(), which returns the character count of the widest line in this column including padding.current_style_as_preset method for convenient conversion of a style into a presetFixed a bug with broken percentage constraints for super wide tables.
Fix wrong calculation due to bytes count instead of char count
Simplify the project's module structure
Add Column::remove_constraint()
Column::remove_constraint()UTF8_NO_BORDERSUTF8_HORIZONTAL_BORDERS_ONLY### Added - Add skeptic tests - Add code coverage - A lot more tests ### Changed - Removed Hidden Constraint
Hidden ConstraintNothing published for this version
Nothing published for this version
Nothing published for this version
Your coding agent can read these notes before it upgrades. Set up the MCP server →