#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

#1124 in Parser implementations

Download history 2/week @ 2024-06-16 12/week @ 2024-06-23 28/week @ 2024-06-30 14/week @ 2024-07-07 39/week @ 2024-07-14 14/week @ 2024-07-21 40/week @ 2024-07-28 6/week @ 2024-08-04 86/week @ 2024-08-11 18/week @ 2024-08-18 15/week @ 2024-08-25 24/week @ 2024-09-01 18/week @ 2024-09-08 33/week @ 2024-09-15 59/week @ 2024-09-22 24/week @ 2024-09-29

139 downloads per month

MIT license

230KB
6.5K SLoC

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

lib.rs:

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).

Dependencies

~5–15MB
~253K SLoC