wez / wezterm

A GPU-accelerated cross-platform terminal emulator and multiplexer written by @wez and implemented in Rust
https://wezfurlong.org/wezterm/
Other
17.79k stars 796 forks source link

usage as library/embedding into other application #6020

Open Froidoh opened 2 months ago

Froidoh commented 2 months ago

I would love to embed wezterm into an application of mine.

I want to leverage some capabilities of wezterm for a rather advanced tui application and instead of saying: "please run on wezterm" (like "best viewed on firefox") I would love to embed wezterm and ship it with the executable.

Is that feasible?

Kreijstal commented 2 months ago

why don't you just make a tui?

Froidoh commented 2 months ago

why don't you just make a tui?

Because I want to rely on a useful terminal emulator.

Which is kind of the point of this "issue". You know, I did think before I created it ;-)

Kreijstal commented 2 months ago

ah you mean embed wezterm in another application a la vscode? interesting, kinda like vte but better

Froidoh commented 2 months ago

ah you mean embed wezterm in another application a la vscode? interesting, kinda like vte but better

Exactly that.

I've edited the title!

Kreijstal commented 2 months ago

ah you mean embed wezterm in another application a la vscode? interesting, kinda like vte but better

Exactly that

wonder if you could just make a vte wrapper from wezterm, so it could be used everywhere where wezterm is used

xobs commented 1 month ago

I have similar usecases.

As an example, I have a debugger that's based on probe-rs. This debugger supports RTT to allow for a terminal to be set up via a block in RAM without any additional wires. It's also potentially faster than a UART.

RTT supports an effectively unlimited number of "channels".

What I would like to do is to have probe-rs (or a similar debugger) open up a bidirectional console for each channel that exists on the target. This is preferable to opening a platform-specific terminal.

What I may do for now is use xterm.js + tauri for this, but it would be much nicer if I could use a native terminal such as Wezterm.