Which crates can be used to have virtual terminals embedded in my gtk application?

I'm currently working on a gtk-rs-based program that needs a virtual terminal to be embedded in it. The Gtk project has a library that creates such a gtk widget, but there are no bindings for gtk-rs. As such, I'm wondering what the next best thing is. I'd like to avoid writing as much as possible for this problem, since it isn't what my program is about. When I try searching on crates.io, the signal to noise ratio is very low since a bunch of TUI crates keep coming up and clogging the results. Despite this, I found a few things that seem to be somewhat helpful, but don't provide a full solution. For example, [vte](http://vte = "0.8.0") seems to just parse some sort of ASCII stream (Does this even work on all platforms, not just Unix-like ones? Other than Linux, I'm mainly interested in Windows with the GNU ABI).


What is your definition of a virtual terminal? If Gtk already provides a virtual terminal component and the problem is gtk-rs doesn't have bindings for it can you create an issue against their repo, or even create the binding yourself and push a PR?

I want a widget that can run any terminal program in it, including TUIs. I've already made on PR to gtk-rs, and I never want to see the guts of GObject again — it was a terrible experience, and I usually don't mind low-level things.

Yeah... Usually when you try to implement interfaces and inheritance in C as a library it'll end up really verbose and full of boilerplate and footguns. COM (the technology underpinning most Windows APIs) is the same.

Turns out there's a reason languages make these things part of the type system and push the hard work onto the compiler :thinking:

1 Like

You just summarized my prior thoughts on the matter.

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.