sys khaiii-sys

Native bindings to the khaiii library

1 unstable release

Uses new Rust 2021

0.1.0+0.4 Nov 20, 2022

48 downloads per month
Used in khaiii-rs



Python 2.5K SLoC // 0.4% comments C++ 1.5K SLoC // 0.2% comments Rust 107 SLoC



khaiii bindings for Rust.

khaiii-rs = "0.1"


The following software is required to use khaiii-rs:

  • CMake 3.10 or up
  • Python3
  • Stable Rust. (khaiii-rs was developed with Rust 1.65.0 but should work with most stable Rust versions)

Version of khaiii

Currently this library requires khaiii 0.4. The source for khaiii is included within the khaiii-sys crate. If khaiii is not already pre-installed on your system you can use the vendored-khaiii feature flag so that the build script will compile, link and generate the khaiii resources for you instead.

Building khaiii-rs

Systems with khaiii pre-installed:

$ git clone https://github.com/ka1wa/khaiii-rs
$ cd khaiii-rs
$ cargo build

Build with vendored source:

$ git clone https://github.com/ka1wa/khaiii-rs
$ cd khaiii-rs
$ cargo build -F vendored-khaiii


Simple tests for the khaiii-rs wrapper are included and can be run through the following command. Similarly to the build command with khaiii pre-installed you can simply run:

$ cargo test

Testing with vendored source:

$ cargo test -F vendored-khaiii

Operating systems

As of right now khaiii-sys, (and therefore khaiii-rs), only supports Linux.


This project is licensed under Apache License, Version 2.0, (LICENSE or https://www.apache.org/licenses/LICENSE-2.0)


~34K SLoC