Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Comparison with other 'table' libraries #76

Closed
danieleades opened this issue May 17, 2022 · 9 comments
Closed

Comparison with other 'table' libraries #76

danieleades opened this issue May 17, 2022 · 9 comments
Assignees

Comments

@danieleades
Copy link
Contributor

There are now a few libraries for pretty-printing tables to the console. It would be really helpful to have a bit of a comparison to allow users (including myself!) to determine which one to go for.

@Nukesor
Copy link
Owner

Nukesor commented May 18, 2022

Feel free to create a MR for this :)

Especially tabled did quite a lot of fancy stuff recently!

@Nukesor
Copy link
Owner

Nukesor commented Jun 8, 2022

I can already give you a short summary on what comfy-table is about:

@danieleades Maybe it would make sense to aks for something like this from each project maintainer?
I think each maintainer is best suited to give a fair assessment of their library :)

Comfy-table

One of comfy-table's big foci is on providing a minimalistic, but rock-solid library for building text-based tables.
This means that the code is very well tested, no usage of unsafe and unwrap is only used if we can be absolutely sure that it's safe.
There're only two occurrences of unsafe in all of comfy-table's dependencies, to be exact inside the tty communication code, which can be explicitly disabled.

The other focus is on dynamic-length content arrangement.
This means that a lot of work went into building an algorithm that finds a (near) optimal table layout for any given text and terminal width.

Other mentionable features are: Custom constraints for layouts, coloring/styling and table design presets.

@Nukesor
Copy link
Owner

Nukesor commented Jun 8, 2022

@Nukesor
Copy link
Owner

Nukesor commented Jun 8, 2022

@danieleades prettytables-rs is indeed unmaintained. I already tried to communicate with the author roughly ~2.5 years ago, which is why I built this library in the first place. (phsym/prettytable-rs#122)

I already went ahead and created a PR and Issue for deprecation,
phsym/prettytable-rs#139
phsym/prettytable-rs#138

as well as a PR for a rust-sec advisory-db entry:
rustsec/advisory-db#1173

@Nukesor
Copy link
Owner

Nukesor commented Jun 8, 2022

@zhiburt @devashishdxt @RyanBluth
I think it would be a good idea to mention in our comparisons that prettytable-rs is indeed unmaintained, so there won't be any future confusion.

I'm not sure why the advisory-db entry isn't being merged, though. This would be the best solution in the long run.

@Nukesor Nukesor self-assigned this Jun 9, 2022
@RyanBluth
Copy link

@Nukesor I added a comment to the term-table-rs repo, but I'll also post it here.

term-table-rs is pretty basic in terms of features. My goal with the project is to provide a good set of tools for rendering CLI tables, while also allowing users to bring their own tools for things like colours. One thing that is unique to term-table-rs(as far as I'm aware) is the ability to have different number of columns in each row of the table.

@Nukesor
Copy link
Owner

Nukesor commented Jul 28, 2022

This worked out quite well in the end. I'm closing this issue :)

@Nukesor Nukesor closed this as completed Jul 28, 2022
@wookietreiber
Copy link

It would be really nice if this could be added to the CLI book, like the useful crates chapter.

@Nukesor
Copy link
Owner

Nukesor commented Aug 16, 2022

@wookietreiber Feel free to do so :) I definitely wouldn't mind!

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

No branches or pull requests

4 participants