A modern, cross-platform Vietnamese Input Method written in Rust, based on the original UniKey project.
UniKey Rust is a complete rewrite of the popular UniKey Vietnamese input method in Rust, designed to be:
- Cross-platform: Linux, Windows, macOS support
- Memory-safe: Leveraging Rust's ownership system
- High-performance: Near C/C++ performance with better safety
- Modern: Clean architecture with excellent error handling
- Extensible: Modular design for easy customization
unikey-rust/
βββ crates/
β   βββ unikey-core/           # Core engine and input processing
β   βββ unikey-encoding/       # Character set conversion
β   βββ unikey-macro/          # Macro system
β   βββ unikey-input-methods/  # Telex, VNI, VIQR implementations
β   βββ unikey-platform-common/# Common platform abstractions
β   βββ unikey-linux/          # Linux XIM/Wayland/GTK integration
β   βββ unikey-windows/        # Windows IME integration
β   βββ unikey-macos/          # macOS Input Method integration
βββ examples/                  # Example applications
βββ tests/                     # Integration tests
βββ docs/                      # Documentation
βββ assets/                    # Data files (macros, keymaps, charsets)
βββ scripts/                   # Build and deployment scripts
Goal: Establish core engine and basic input processing
- Project scaffolding and workspace setup
-  Core data structures (VnLexiName,VowelSeq,KeyEvent)
- Character set definitions and mappings
- Basic error handling and logging
- Abstract input method trait
- Key event classification system
- Basic input processing pipeline
- Unit tests for core functionality
- Telex input method implementation
- Vowel sequence processing
- Tone mark handling
- Special character processing (Δ, Γ’, Δ, etc.)
- VNI input method implementation
- VIQR input method implementation
- Input method switching
- Comprehensive testing
Goal: Complete character set conversion system
- Character set conversion traits
- Unicode handling (UTF-8, UTF-16, UCS-2)
- Vietnamese character mappings
- Composite character support
- TCVN3, VPS, VISCII support
- VNI-Win, BKHCM support
- VIQR encoding
- Windows CP1258 support
Goal: Implement advanced features and optimizations
- Macro definition and storage
- Macro lookup and replacement
- File I/O for macro persistence
- Macro editor utilities
- Vietnamese word detection
- Non-Vietnamese sequence handling
- Free marking support
- Modern style processing
Goal: Platform-specific integrations
- XIM server implementation
- X11 event handling
- System tray integration
- Configuration management
- Wayland input method protocol
- GTK4 input method module
- Modern Linux desktop integration
- Flatpak/AppImage packaging
- Windows IME framework
- System tray and notifications
- Registry configuration
- Windows-specific optimizations
- macOS Input Method framework
- System preferences integration
- macOS-specific UI components
- App Store packaging
Goal: Performance optimization and user experience
- Profiling and benchmarking
- Memory usage optimization
- Input latency reduction
- CPU usage optimization
- Configuration GUI
- Hotkey management
- Status indicators
- User documentation
- Comprehensive test suite
- Fuzzing and stress testing
- Cross-platform testing
- Performance regression testing
- Documentation completion
- Packaging for all platforms
- Release notes and migration guide
- Community feedback integration
- Core logic in unikey-core
- Platform-specific code in respective platform crates
- Shared utilities in unikey-platform-common
- Data files in assets/directory
- Unit tests for each module
- Integration tests for cross-module functionality
- Property-based testing for input processing
- Platform-specific tests for each OS
- Input latency: < 5ms for key processing
- Memory usage: < 10MB baseline
- CPU usage: < 1% idle, < 5% during typing
- Startup time: < 100ms
- Rust 1.70+ (stable)
- Platform-specific dependencies (see individual crate READMEs)
# Clone the repository
git clone https://github.com/unikey-rust/unikey.git
cd unikey
# Build all crates
cargo build --release
# Run tests
cargo test
# Run examples
cargo run --example simple-gui# Linux (XIM)
cargo build --release -p unikey-linux
# Windows (IME)
cargo build --release -p unikey-windows
# macOS (Input Method)
cargo build --release -p unikey-macosWe welcome contributions! Please see CONTRIBUTING.md for guidelines.
- Core engine improvements
- New input methods
- Platform integrations
- Performance optimizations
- Documentation
- Testing
This project is licensed under the GNU General Public License v2.0 or later - see the LICENSE file for details.
- Original UniKey project by Pham Kim Long
- Vietnamese input method community
- Rust ecosystem contributors
- Issues: GitHub Issues
- Discussions: GitHub Discussions
- Documentation: Project Wiki
Status: π§ In Active Development
Current Phase: Phase 1 - Core Foundation
Next Milestone: Basic Telex input method implementation