0.0.8 • Published 5 months ago

tauri-pty v0.0.8

Weekly downloads
-
License
MIT
Repository
github
Last release
5 months ago

Tauri Plugin Pseudo Terminal

Developing! Wellcome to contribute!

Example

Full example at: https://github.com/Tnze/tauri-plugin-pty/tree/main/examples/vanilla

# Install this plugin in your Cargo.toml
cargo add tauri-plugin-pty
# Install the api package
npm install tauri-pty
tauri::Builder::default()
    .plugin(tauri_plugin_pty::init()) // add this
    .run(tauri::generate_context!())
    .expect("error while running tauri application");
...
import { Terminal } from "xterm"
import { spawn } from "tauri-pty";

// init xterm.js
const term = new Terminal();
term.open(/* DOM Elem */);
// spawn shell
const pty = spawn("powershell.exe", [/* args */], {
    cols: term.cols,
    rows: term.rows,
})
// transport data
pty.onData(data => term.write(data))
term.onData(data => pty.write(data))
0.0.3

5 months ago

0.0.8

5 months ago

0.0.5

5 months ago

0.0.4

5 months ago

0.0.7

5 months ago

0.0.6

5 months ago

0.0.2

5 months ago

0.0.1

5 months ago