#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

#1175 in Parser implementations

Download history 15/week @ 2024-07-22 36/week @ 2024-07-29 28/week @ 2024-08-05 65/week @ 2024-08-12 19/week @ 2024-08-19 16/week @ 2024-08-26 22/week @ 2024-09-02 22/week @ 2024-09-09 31/week @ 2024-09-16 59/week @ 2024-09-23 26/week @ 2024-09-30 34/week @ 2024-10-07 16/week @ 2024-10-14 14/week @ 2024-10-21 17/week @ 2024-10-28 32/week @ 2024-11-04

81 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–18MB
~256K SLoC