PackageTrack
Sign in Get early access

comfy-table

An easy to use library for building beautiful tables with automatic content wrapping

8.0.0 93M downloads/mo #844 most downloaded on crates.io nukesor/comfy-table

What this package is like to depend on

Last release 18 days ago

05 Aug 2026

Ships fairly regularly

a new release about every 4 months

Most releases are documented

notes for 41 of 46 stable releases

Nothing withdrawn

no release was ever pulled

7 years old

47 releases · first in 2020

3 releases in the last 12 months

see the full history below

Release timeline

47 releases · Jan 2020 to Aug 2026
2021 2022 2023 2024 2025 2026
Release Pre-release

Releases

latest 47
  1. 8.0.0 05 Aug 2026
    Release notes

    [8.0.0] - 05.08.2026

    Breaking Changes

    • The following types and functions have been removed:

      • TableComponent enum
      • The modifiers module and Table::apply_modifier have been removed.
      • Table::current_style_as_preset
      • Table::set_style
      • Table::style
      • Table::remove_style
      • Table::load_preset
    • The 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:

      • Presets in 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.
        The mut handle can be used to change the style.
      • Instead of modifiers, there are now functions on TableStyle TableStyle::with_rounded_corners/TableStyle::with_solid_inner_borders.
      • All fields of 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.

    Fix

    • Various performance improvements that reduce table formatting time quite a bit:

      • ~36% for "normal" tables (The readme of the project). 17µs -> 11µs
      • ~34% for "larger" tables, which I would consider a reasonable usecase. 253µs -> 172µs
      • ~70% for very large tables, i.e. a 10x500 table. -> 20.8ms -> 6.15ms

      Most of these improvements boil down to:

      • Less string allocations.
      • Special handling when handling ASCII-only text, as grapheme handling can be skipped in those cases.
      • Moving computational heavy stuff (such as UTF-8 width calculations) out of hot loops.
    • 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.

    Open source →
    Release notes

    Breaking Changes

    • The following types and functions have been removed:

      • TableComponent enum
      • The modifiers module and Table::apply_modifier have been removed.
      • Table::current_style_as_preset
      • Table::set_style
      • Table::style
      • Table::remove_style
      • Table::load_preset
    • The 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:

      • Presets in 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. The mut handle can be used to change the style.
      • Instead of modifiers, there are now functions on TableStyle TableStyle::with_rounded_corners/TableStyle::with_solid_inner_borders.
      • All fields of 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.

    Fix

    • Various performance improvements that reduce table formatting time quite a bit:

      • ~36% for "normal" tables (The readme of the project). 17µs -> 11µs
      • ~34% for "larger" tables, which I would consider a reasonable usecase. 253µs -> 172µs
      • ~70% for very large tables, i.e. a 10x500 table. -> 20.8ms -> 6.15ms

      Most of these improvements boil down to:

      • Less string allocations.
      • Special handling when handling ASCII-only text, as grapheme handling can be skipped in those cases.
      • Moving computational heavy stuff (such as UTF-8 width calculations) out of hot loops.
    • 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.

    Open source →
  2. 7.2.2 13 Jan 2026
    Release notes

    [7.2.2] - 2026-01-13

    Fix

    • Minor performance improvements
    • Fixed an edge-case, where multiple LowerBoundary constraints weren't uphold.
    • Fixed an issue where tables were misformatted when no vertical border styling was specified. #198

    [7.2.1] - 2025-09-11

    Misc

    • Adjust a single test case to not fail in 0x0 sized tty-environments. !186
    Open source →
    Release notes

    Fix

    • Minor performance improvements
    • Fixed an edge-case, where multiple LowerBoundary constraints weren't uphold.
    • Fixed an issue where tables were misformatted when no vertical border styling was specified. #198
    Open source →
  3. 7.2.1 11 Sep 2025
    Release notes

    chore: Release comfy-table version 7.2.1

    Open source →
    Release notes

    Misc

    • Adjust a single test case to not fail in 0x0 sized tty-environments. !186
    Open source →
  4. 7.2.0 28 Aug 2025
    Release notes

    [7.2.0] - 2025-08-25

    Chore

    • Switch to Rust 2024 edition. This bumps the MSRV to 1.85 and thereby no longer supports the wasm32-wasi target.

    Fix

    • Also update the crossterm dependency to 0.29 for windows !181.
    Open source →
    Release notes

    Chore

    • Switch to Rust 2024 edition. This bumps the MSRV to 1.85 and thereby no longer supports the wasm32-wasi target.

    Fix

    • Also update the crossterm dependency to 0.29 for windows !181.
    Open source →
  5. 7.1.4 07 Feb 2025
    Release notes

    [7.1.4] - 2025-02-07

    Fix

    • Handle UTF-8 graphemes when truncating cells. #167
    • Respect UTF-8 zero-width joiner and variation selection characters when splitting words. #168 by tisonkun

    Change

    • Remove strum dependency. #169 by tisonkun
    • Introduce the unicode-segmentation library in the scope of #167 and #168.
    • The new changes for correct UTF-8 handling have a performance hit of up to ~67%.
      However, this will be most likely unnoticable for most people.
      The benchmark table with 10 columns and 500 rows slowed down from 15ms to 25ms.
      For "normal" tables, the performance hit is negligible.

    Chore

    • Bump ansi-str
    Open source →
    Release notes

    Fix

    • Handle UTF-8 graphemes when truncating cells. #167
    • Respect UTF-8 zero-width joiner and variation selection characters when splitting words. #168 by tisonkun

    Change

    • Remove strum dependency. #169 by tisonkun
    • Introduce the unicode-segmentation library in the scope of #167 and #168.
    • The new changes for correct UTF-8 handling have a performance hit of up to ~67%. However, this will most likely unnoticable for most people. The benchmark table with 10 columns and 500 rows slowed down from 15ms to 25ms. For "normal" tables, the performance hit is negligible.
    Open source →
  6. 7.1.3 14 Nov 2024
    Release notes

    [7.1.3] - 2024-11-24

    Fix

    • Bump crossterm to 0.28 on Windows as well
    Open source →
    Release notes

    Fix

    • Bump crossterm to 0.28 on Windows as well
    Open source →
  7. 7.1.2 13 Nov 2024
    Release notes

    [7.1.2] - 2024-11-24

    Chore

    • Bump crossterm to 0.28
    • Bump unicode-width to 0.2
    Open source →
    Release notes

    Chore

    • Bump crossterm to 0.28
    • Bump unicode-width to 0.2
    Open source →
  8. 7.1.1 05 Apr 2024
    Release notes

    [7.1.1] - 2024-04-05

    Fix

    • Fix string width calculation with ANSI escape sequences by switching to the ansi-str crate.
      The previous implementation didn't respect OSC 8 hyperlink style ANSI sequences.
      Implemented by dsully in #137.
    • custom_styling feature now requires tty feature as it should.
    Open source →
  9. 7.1.0 21 Oct 2023
    Release notes

    [7.1.0] - 2023-10-21

    Added

    • 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 returns if the table is empty (contains no data rows). Implemented by
      Techassi in #119.

    Chore

    • Bump crossterm dependency
    Open source →
    Release notes

    Added

    • 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 returns if the table is empty (contains no data rows). Implemented by Techassi in #119.

    Chore

    • Bump crossterm dependency
    Open source →
  10. 7.0.1 16 Jun 2023
    Release notes

    [7.0.1] - 2023-06-16

    Fix

    • Fix a panic when working with extreme paddings, where (padding.left + padding.right) > u16::MAX.
    • Fix a panic when working with extremely long content, where (content_width + padding) > u16::MAX.
    • Properly enforce lower boundary constraints.
      Previously, "normal" columns were allocated before lower boundaries were respected.
      This could lead to scenarios, where the table would grow beyond the specified size, when there was a lower boundary.
    • Fix calculation of column widths for empty columns.
      The minimum content width for a column is 1 char, but the column_max_content_widths function on the table returned a 0 width for fully empty columns.
      This resulted in tables becoming larger than specified if there were any empty columns.

    Misc

    • Extend property tests, which lead to the discovery of some bugs.
    Open source →
  11. 7.0.0 06 Jun 2023
    Release notes

    Breaking

    • 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

    Added

    • reexport_crossterm feature flag to enable old crossterm re-export.
    Open source →
  12. 6.2.0 26 May 2023
    Release notes

    Added

    • Add support for custom ansi styling inside of cells. This feature is hidden behind the feature flag custom_styling. Implemented by blueforesticarus in #93.
    • Add helper functions add_row[s]_if, which filtering of rows by a predicate. Implemented by Techassi in #106.

    Maintenance

    • Bump dependencies
    Open source →
  13. 6.1.4 31 Dec 2022
    Release notes

    Added

    • New preset ASCII_FULL_CONDENSED #97
    Open source →
  14. 6.1.3 21 Nov 2022
    Release notes

    Fixed

    • Disable unneeded crossterm bracketed-paste feature.
    Open source →
  15. 6.1.2 27 Oct 2022
    Release notes

    Fixed

    • Table::row_iter no longer requires a &mut self, but only &self.
    Open source →
  16. 6.1.1 18 Oct 2022
    Release notes

    Fixed

    • Fixed an issue where dynamic arrangement failed when setting the table to the exact width of the content #90.
    • The header size is now properly respected in the final optimization step #90. Previously, this wasn't the case and lead to weird formatting behavior when both of the following were true
      • Dynamic content adjustment was active.
      • The table didn't fit into the the available space.
      • The header of a row was longer than its content.
    • Fix wrong LowerBoundary calculation. This was introduced in commit bee764d, when this logic was refactored. #90.
    • Table::column_iter no longer requires a &mut self, but only &self.

    Added

    • Expose current ContentArrangement for table via table.content_arrangement.
    Open source →
  17. 6.1.0 28 Aug 2022
    Release notes

    Added

    • Add Table::add_rows to add multiple rows at the same time.

    Misc

    • Update crossterm to v0.24
    Open source →
  18. 6.0.0 30 May 2022
    Release notes

    Added

    • Add Table::style_text_only(), which prevents non-delimiter whitespaces in cells to be styled.
    • Add the Table::discover_columns function and add info on when to use it to Row::add_cell.

    Breaking Changes

    • Renaming of several functions to be Rust idiomatic:
      • Cell::get_content -> Cell::content
      • Column::get_padding_width -> Column::padding_width
      • Column::get_constraint -> Column::constraint
      • Table::get_header -> Table::header
      • Table::get_table_width -> Table::width
      • Table::set_table_width -> Table::set_width
      • Table::set_style -> Table::style
      • Table::get_column -> Table::column
      • Table::get_column_mut -> Table::column_mut
      • Table::get_row -> Table::row
      • Table::get_row_mut -> Table::row_mut
    • Column::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 instead

    Changed

    • Table::column_max_content_widths now performs a full scan of the table's content when called.
    • Don't include Table::is_tty, Table::force_no_tty and Table::should_style if tty feature isn't enabled.
    Open source →
  19. 6.0.0-rc.1 11 Mar 2022 pre-release

    Nothing published for this version

  20. 5.0.1 18 Feb 2022
    Release notes

    Updates

    • All dependencies have been bumped.
    Open source →
  21. 5.0.0 07 Nov 2021
    Release notes

    Updates

    • All dependencies have been bumped.

    Added

    • Add option to use stderr for is_tty check #25.

    Breaking

    • Remove ASCII_HORIZONTAL_BORDERS_ONLY in favor of ASCII_HORIZONTAL_ONLY.
    • Remove UTF8_HORIZONTAL_BORDERS_ONLY in favor of UTF8_HORIZONTAL_ONLY.
    Open source →
  22. 4.1.1 11 Aug 2021
    Release notes

    Added

    • tty feature flag, which enables tty related functionality. This includes styling and terminal-width detection. The tty feature flag is enabled by default. Implemented by roee88 in #47.
    Open source →
  23. 4.1.0 09 Aug 2021
    Release notes

    Added

    • Add modifiers::UTF8_SOLID_INNER_BORDERS, which makes the inner borders solid lines: │─ by ModProg for #39.
    • Add presets::ASCII_BORDERS_ONLY_CONDENSED, which is ASCII_BORDERS_ONLY but without spacing between rows #43.

    Fixed

    • Several preset examples weren't correct.
    • Multi-character UTF8 symbols are now handled correctly in most situations. Table-layout might still break for 1-character columns.
    • Mid-word splitting now takes multi-character utf8 characters into account.

    Changed

    • Rename ASCII_HORIZONTAL_BORDERS_ONLY to ASCII_HORIZONTAL_ONLY. Old imports will still work until v5.0.
    • Rename UTF8_HORIZONTAL_BORDERS_ONLY to UTF8_HORIZONTAL_ONLY. Old imports will still work until v5.0.
    Open source →
  24. 4.0.1 08 Jul 2021
    Release notes

    Fixed

    • Some docstrings on the ColumnConstraint and Width enum were wrong.
    Open source →
  25. 4.0.0 03 Jul 2021
    Release notes

    Added

    • Add Table::lines, which returns an iterator over all lines of the final table output by dmaahs2017 for #35.
    • Add ColumnConstraints::Boundaries{lower: Width, upper: Width} to specify both an upper and a lower boundary.

    Fixed

    • Fixed percentages sometimes weren't correctly calculated, due to not taking border columns into account.
    • Return None for Table::get_table_width, if getting the terminal size somehow failed.
    • Fixed a lot of possible, but highly unlikely number conversion overflow issues.
    • Run space optimization under all circumstances.
    • Percentage constraints with values of >100 will now be capped to 100.
    • The MinConstraint would be ignored when:
      • The content was larger than the min constraint
      • There was less space available than specified in the constraint.

    Changed

    • The way ColumnConstraints are initialized has been changed. There is now
    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),
    }
    
    Open source →
  26. 3.0.0 13 Jun 2021
    Release notes

    Breaking changes

    • 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
    • Add the Cells type, to allow super generic Iterator -> Row conversions.
    Open source →
  27. 2.1.0 26 Jan 2021
    Release notes

    Added

    • 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.
    Open source →
  28. 2.0.0 17 Jan 2021
    Release notes

    Added

    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 |
    +-------------------------------+
    
    Open source →
  29. 1.6.0 16 Jan 2021
    Release notes

    Added

    • Add the NOTHING preset, which prints no borders or lines at all.
    Open source →
  30. 1.5.0 29 Dec 2020
    Release notes

    Added

    • Add table::trim_fmt, which trims all trailing whitespaces on tables with no right border.
    Open source →
  31. 1.4.2 06 Dec 2020

    Nothing published for this version

  32. 1.4.1 06 Dec 2020

    Nothing published for this version

  33. 1.4.0 06 Dec 2020
    Release notes

    Added

    • Allow to set custom delimiters on tables, columns and cells.

    Changed

    • Expose all important traits. I.e. ToRow, ToCell and ToCells.
    Open source →
  34. 1.3.0 08 Nov 2020
    Release notes

    Added

    • New ColumnConstraint for hiding columns
    Open source →
  35. 1.2.0 27 Oct 2020
    Release notes

    Added

    • Add the option to set a max-height on rows. Long content will be truncated.
    Open source →
  36. 1.1.1 23 Aug 2020
    Release notes

    Changed

    • A simple update of all dependencies.
    Open source →
  37. 1.1.0 23 Aug 2020
    Release notes

    Changed

    • Move is_tty logic from atty to crossterm.
    • Remove skeptic, since it fails in CI and bloats compile time. Compile time is reduced by ca. 40%.
    Open source →
  38. 1.0.0 07 Jul 2020
    Release notes

    Changed

    • The project has been in use for quite some time and seems to be quite stable!
    • Use cargo's example functionality for examples.
    Open source →
  39. 0.1.1 24 May 2020
    Release notes

    Added

    • 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 preset
    • New Markdown like table style prefix. Thanks to joeydumont.
    Open source →
  40. 0.1.0 21 Mar 2020
    Release notes

    Added

    • Better test coverage

    Fixed

    • Fixed a bug with broken percentage constraints for super wide tables.
    Open source →
  41. 0.0.7 09 Feb 2020
    Release notes

    Added

    • Introduce proptest

    Fixed

    • Fix wrong calculation due to bytes count instead of char count
    • Fix panics caused by wrong string splits
    Open source →
  42. 0.0.6 30 Jan 2020
    Release notes

    Changed

    • Crossterm 0.15 update
    • Simplify the project's module structure
    Open source →
  43. 0.0.5 29 Jan 2020
    Release notes

    Added

    • Add Column::remove_constraint()
    • Preset UTF8_NO_BORDERS
    • Preset UTF8_HORIZONTAL_BORDERS_ONLY
    Open source →
  44. 0.0.4 27 Jan 2020
    Release notes

    Added

    • Add skeptic tests
    • Add code coverage
    • A lot more tests

    Changed

    • Removed Hidden Constraint
    Open source →
  45. 0.0.3 26 Jan 2020

    Nothing published for this version

  46. 0.0.2 26 Jan 2020

    Nothing published for this version

  47. 0.0.1 19 Jan 2020

    Nothing published for this version

Every package, every release, already written down.

The archive is open and free. Watching your own project is what we are building next.

Browse the archive