https://github.com/messense/opencc-rs
OpenCC binding for Rust.
https://github.com/messense/opencc-rs
binding opencc rust
Last synced: about 2 months ago
JSON representation
OpenCC binding for Rust.
- Host: GitHub
- URL: https://github.com/messense/opencc-rs
- Owner: messense
- License: mit
- Created: 2015-05-26T16:14:07.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2018-01-31T01:58:56.000Z (over 7 years ago)
- Last Synced: 2025-04-15T04:12:10.182Z (about 2 months ago)
- Topics: binding, opencc, rust
- Language: Rust
- Homepage: https://messense.github.io/opencc-rs
- Size: 4.24 MB
- Stars: 5
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# opencc-rs
[](https://travis-ci.org/messense/opencc-rs)
[](https://coveralls.io/r/messense/opencc-rs)
[](https://crates.io/crates/opencc)OpenCC binding for Rust.
[Read the documentation](https://messense.github.io/opencc-rs).
## Installation
You should install [OpenCC 1.0.x](https://github.com/BYVoid/OpenCC) library first.
Add it to your ``Cargo.toml``:
```toml
[dependencies]
opencc = "*"
```Add ``extern crate opencc`` to your crate root and your're good to go!
For example:```rust
extern crate opencc;use opencc::OpenCC;
fn main() {
let cc = OpenCC::new("t2s.json");
println!("{}", cc.convert("乾坤一擲"));
println!("{}", cc.convert("開放中文轉換"));
}
```## License
This work is released under the MIT license. A copy of the license is provided in the [LICENSE](./LICENSE) file.