Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/messense/opencc-rs
OpenCC binding for Rust.
https://github.com/messense/opencc-rs
binding opencc rust
Last synced: 28 days 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 (over 9 years ago)
- Default Branch: master
- Last Pushed: 2018-01-31T01:58:56.000Z (almost 7 years ago)
- Last Synced: 2024-10-04T12:41:48.648Z (about 1 month ago)
- Topics: binding, opencc, rust
- Language: Rust
- Homepage: https://messense.github.io/opencc-rs
- Size: 4.24 MB
- Stars: 3
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# opencc-rs
[![Build Status](https://travis-ci.org/messense/opencc-rs.svg)](https://travis-ci.org/messense/opencc-rs)
[![Coverage Status](https://coveralls.io/repos/messense/opencc-rs/badge.svg)](https://coveralls.io/r/messense/opencc-rs)
[![Crates.io](https://img.shields.io/crates/v/opencc.svg)](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.