Add Web Assembly build support

Leave out the PTY modules and dependencies on WASM so the parser and the
terminal model can build for WASM.
This commit is contained in:
Fabien Salathe authored and GitHub committed 2026-11-06 22:34:25 +01:00
1 parent aecf0f600f
commit aa5d942f46
3 files changed
+12 -3

No files matched your search

+4
View File
@@ -10,6 +10,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
## 0.26.1-dev
### Added
- Web Assembly build support (without the PTY modules)
### Fixed
- Panic when the PTY could not be set to non-blocking
+5 -3
View File
@@ -18,16 +18,18 @@ serde = ["dep:serde", "bitflags/serde", "vte/serde"]
arrayvec = { version = "0.7.2", features = ["serde"] }
base64 = "0.22.0"
bitflags = "2.4.1"
home = "0.5.5"
libc = "0.2"
log = "0.4"
parking_lot = "0.12.0"
polling = "3.8.0"
regex-automata = "0.4.3"
unicode-width = "0.2.0"
vte = { version = "0.15.0", default-features = false, features = ["std", "ansi"] }
serde = { version = "1", features = ["derive", "rc"], optional = true }
[target.'cfg(not(target_family = "wasm"))'.dependencies]
home = "0.5.5"
libc = "0.2"
polling = "3.8.0"
[target.'cfg(unix)'.dependencies]
rustix-openpty = "0.2.0"
rustix = { version = "1.0.0", default-features = false, features = ["std"] }
+3
View File
@@ -5,13 +5,16 @@
#![cfg_attr(clippy, deny(warnings))]
pub mod event;
#[cfg(not(target_family = "wasm"))]
pub mod event_loop;
pub mod grid;
pub mod index;
pub mod selection;
pub mod sync;
pub mod term;
#[cfg(not(target_family = "wasm"))]
pub mod thread;
#[cfg(not(target_family = "wasm"))]
pub mod tty;
pub mod vi_mode;