Git Product home page Git Product logo

icu-sys's Introduction

icu-sys

This crate provides direct Rust bindings to the majority of the ICU C API.

This is partially derived from https://github.com/servo/rust-icu.

Documentation

Getting icu-sys

icu-sys is not on crates.io because the ICU source exceeds the maximum permitted size of a crate. Instead, you can add it as git dependency in Cargo.toml:

[dependencies.icu-sys]
git = "https://github.com/fullcontact/icu-sys"
rev = "0.1.0"

Available Modules

This crate does not currently include every module in ICU. The ones here are the ones listed as C APIs under http://icu-project.org/apiref/icu4c/, minus things so specific to C that they are not useful to bind or could not be bound automatically, plus other modules as found to be necessary via dependencies from other modules or by general usage.

The modules included are listed in create-sources.sh. Adding a new module is usually as simple as adding it to the list there and regenerating the sources. Please feel free to make a PR if you find an addition you need.

Building

cargo build will build everything, including a static build of ICU without symbol renaming. You need make, gcc, and g++ for this.

Updating ICU

The icu directory contains an unmodified copy of the ICU sources. They can be upgraded as follows:

  • Replace the icu directory with the new sources.

  • Run cargo build. There's a decent chance this will fail; you don't need to address the errors immediately.

  • Run ./create-sources.sh to rebuild the bindings. You need to pass the path to the install prefix created by the prior step (see the script for an example). You need bindgen installed for this step.

  • Run cargo build. If any errors occur, address them by modifying create-sources.sh as needed, then go back to the previous step.

  • Commit your changes, including the new generated sources.

License

The bindings themselves are placed under the usual MIT/Apache-2.0 license. This crate also includes the unmodified ICU library itself, which remains under the ICU license (see icu/license.html for details).

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

icu-sys's People

Contributors

altsysrq avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.