#vietnamese #ime


An input method library for vietnamese IME

16 releases (4 breaking)

0.5.1 Oct 3, 2023
0.5.0 Oct 2, 2023
0.4.0 Jul 10, 2023
0.3.8 Mar 17, 2023
0.1.1 Jul 14, 2020

#239 in Text processing

Download history 4/week @ 2023-10-31 1/week @ 2023-11-07 17/week @ 2023-11-14 8/week @ 2023-11-21 35/week @ 2023-11-28 18/week @ 2023-12-12 48/week @ 2023-12-26 2/week @ 2024-01-02 1/week @ 2024-01-16 3/week @ 2024-01-23 34/week @ 2024-01-30 5/week @ 2024-02-06 115/week @ 2024-02-13

157 downloads per month

Custom license



Cargo Crate Docs License

A input method library for Vietnamese input engine written completely in Rust

What is this?

Since typing Vietnamese on Linux is pretty painful at the momment, a better input engine is always needed. To accommodate the future engines that will be built in Rust, this library existed to transform key inputs into the Vietnamese string output.

If you wish to find out how it works, I have written a short blog post (in Vietnamese) on how the library place a tone mark when it received the user input. Read it here.


Add vi to your dependencies in Cargo.toml.

vi = "0.5.1"


With vi, you can start building your own Vietnamese IME without worrying about how Vietnamese tone mark placement works. All you have to do is to implement a keyboard listener & a key sending system.

extern crate vi;

use vi::vni;

fn main() {
    let inputs = vec![
        vec!['v', 'i', 'e', 't', '6', '5'],
        vec!['n', 'a', 'm']

    let mut result = String::new();
    for input in inputs {
        vni::transform_buffer(input.iter().cloned(), &mut result);
        result.push(' ');
    println!("{}", result); // prints "việt nam "

Please refer to the examples/ directory to learn more.


  • VNI
  • Telex

Project status

Currently, this project is still at its early stage of development. There might be some minor bugs but overall, it should be 95% functional.


Want to support me? Consider buying me a coffee:)



~43K SLoC