chewing_sys/
lib.rs

1#![allow(non_snake_case)]
2
3include!("../bindings.rs");
4
5#[cfg(test)]
6mod tests {
7    use super::*;
8
9    #[test]
10    fn test_bindings() {
11        unsafe {
12            let ctx = chewing_new();
13            let kbtype = chewing_get_KBType(ctx);
14            println!("{}", kbtype);
15            println!("Mode {}", chewing_get_ChiEngMode(ctx));
16            chewing_set_ChiEngMode(ctx, 1);
17            println!("mode {}", chewing_get_ChiEngMode(ctx));
18            chewing_delete(ctx);
19        }
20    }
21}