#x11 #no-std #x11rb

no-std xim

XIM protocol parser, handler

7 unstable releases (3 breaking)

0.4.0 Dec 23, 2023
0.3.0 Sep 27, 2023
0.2.3 Jan 31, 2023
0.2.1 Nov 20, 2022
0.1.1 Mar 22, 2021

#581 in Parser implementations

Download history 29/week @ 2023-12-18 16/week @ 2023-12-25 8/week @ 2024-01-15 1/week @ 2024-01-22 3/week @ 2024-02-05 20/week @ 2024-02-19 12/week @ 2024-02-26 14/week @ 2024-03-04 34/week @ 2024-03-11 13/week @ 2024-03-18 3/week @ 2024-03-25 28/week @ 2024-04-01

80 downloads per month

MIT license

6.5K SLoC


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


Binding with X client libraries


Read/Write xim message generated from xim-gen


xim protocol parser generator


  • Parse messages
  • Basic protocol
  • Extension protocol
  • AttributeBuilder

binding for X client


  • client
  • server


  • client
  • server


  • 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


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 Client trait (requires the client feature).
  • An implementation of an XIM server, via the Server trait (requires the server feature).
  • A wrapper around x11rb, the X rust bindings. See the x11rb module for more information (requires the x11rb-client or x11rb-server feature).
  • A wrapper around x11-dl, the standard X11 library. See the xlib module for more information (requires the xlib-client feature).


~254K SLoC