docs.rs failed to build tauri-plugin-pty-0.1.0
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Visit the last successful build:
tauri-plugin-pty-0.0.8
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
# Install the api package
.plugin // add this
.run
.expect;
...
default
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))