forked from JetBrains/jediterm
-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Overview
Investigate feasibility of building BossTerm for WebAssembly (Wasm) target.
Current State
- All code is JVM-specific (desktopMain/jvmMain)
- No commonMain source sets exist
- Heavy dependencies on JVM-only libraries (pty4j, AWT, java.io)
Blockers
Critical (Cannot be resolved in Wasm)
- PTY/process spawning - Wasm sandbox prevents local shell access
- Compose Desktop - No Wasm rendering equivalent
Major (Requires significant refactoring)
- java.io dependencies throughout codebase
- ScheduledExecutorService for threading
- Blocking I/O patterns incompatible with JS async model
- ICU4J for grapheme clustering
Proposed Approach
Rather than a full Wasm port, extract terminal emulation core as a reusable library:
-
Phase 1: Create commonMain structure
- Extract platform-agnostic terminal logic
- Abstract I/O behind interfaces (expect/actual)
-
Phase 2: Wasm terminal library
- BossEmulator, TerminalLine, ANSI parsing
- Buffer management, text styling
- Result:
bossterm-core-wasmlibrary
-
Phase 3: Web terminal client (optional)
- Pair with xterm.js for rendering
- WebSocket connection to SSH server
- No local PTY (server-side only)
Use Cases for Wasm Library
- Embedded terminal widgets in web apps
- Browser-based SSH clients
- Online IDE terminal panels
- Documentation with interactive examples
Effort Estimate
- Phase 1: 2-4 weeks
- Phase 2: 8-12 weeks
- Phase 3: 4-6 weeks (optional)
Related
- Kotlin/Wasm: https://kotlinlang.org/docs/wasm-overview.html
- Compose for Web: https://www.jetbrains.com/lp/compose-multiplatform/
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request