1 unstable release
| 0.4.0-zed | Oct 5, 2025 |
|---|
#1470 in Parser implementations
6,142 downloads per month
Used in 4 crates
235KB
6.5K
SLoC
Implements the X Input Method (XIM) protocol.
XIM is the input method framework used for X11 applications. To clarify, it provides a strategy for users of non-English keyboard to type symbols using only keys that are available on the keyboard. XIM involves two processes. One is the server, which waits for keyboard input in order to compose it into a symbol. The other is the client, which is usually a normal X11 application that waits for and acts on XIM events.
This crate provides the following features:
- An implementation of an XIM client, via the
Clienttrait (requires theclientfeature). - An implementation of an XIM server, via the
Servertrait (requires theserverfeature). - A wrapper around
x11rb, the X rust bindings. See thex11rbmodule for more information (requires thex11rb-clientorx11rb-serverfeature). - A wrapper around
x11-dl, the standard X11 library. See thexlibmodule for more information (requires thexlib-clientfeature).
xim-rs
XIM protocol handler in Rust
Server example
You can see xim server example in my IME
Minimum Safe Rust Version
The current Minimum Safe Rust Version in 1.64. The current tentative policy is that any change in the MSRV will be accompanied by a minor version bump.
project structure
xim
Binding with X client libraries
xim-parser
Read/Write xim message generated from xim-gen
xim-gen
xim protocol parser generator
features
- Parse messages
- Basic protocol
- Extension protocol
- AttributeBuilder
binding for X client
xlib
- client
- server
x11rb
- client
- server
limitations
- Only native endian is supported
- Only support utf-8 and JIS X0208-1983 of CTEXT
- Auth, StrConvertion doesn't supported since they are not used in real world
Dependencies
~5–11MB
~276K SLoC