-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adds bindings needed for the
unum.h
header
This will allow us to implement the functionality in `unum.h` Issue #141.
- Loading branch information
Showing
7 changed files
with
112 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
[package] | ||
authors = ["Google Inc."] | ||
edition = "2018" | ||
license = "Apache-2.0" | ||
name = "rust_icu_unum" | ||
readme = "README.md" | ||
repository = "https://github.com/google/rust_icu" | ||
version = "0.3.1" | ||
default-features = false | ||
keywords = ["icu", "unicode", "i18n", "l10n"] | ||
|
||
description = """ | ||
Native bindings to the ICU4C library from Unicode. | ||
- ufmt.h: Number formatting support | ||
""" | ||
|
||
[dependencies] | ||
log = "0.4.6" | ||
paste = "0.1.5" | ||
rust_icu_common = { path = "../rust_icu_common", version = "0.3.1", default-features = false } | ||
rust_icu_sys = { path = "../rust_icu_sys", version = "0.3.1", default-features = false } | ||
rust_icu_ustring = { path = "../rust_icu_ustring", version = "0.3.1", default-features = false } | ||
anyhow = "1.0.25" | ||
|
||
[dev-dependencies] | ||
anyhow = "1.0.25" | ||
|
||
# See the feature description in ../rust_icu_sys/Cargo.toml for details. | ||
[features] | ||
default = ["use-bindgen", "renaming", "icu_config"] | ||
|
||
use-bindgen = [ | ||
"rust_icu_common/use-bindgen", | ||
"rust_icu_sys/use-bindgen", | ||
"rust_icu_ustring/use-bindgen", | ||
] | ||
renaming = [ | ||
"rust_icu_common/renaming", | ||
"rust_icu_sys/renaming", | ||
"rust_icu_ustring/renaming", | ||
] | ||
icu_config = [ | ||
"rust_icu_common/icu_config", | ||
"rust_icu_sys/icu_config", | ||
"rust_icu_ustring/icu_config", | ||
] | ||
icu_version_in_env = [ | ||
"rust_icu_common/icu_version_in_env", | ||
"rust_icu_sys/icu_version_in_env", | ||
"rust_icu_ustring/icu_version_in_env", | ||
] | ||
icu_version_64_plus = [ | ||
"rust_icu_common/icu_version_64_plus", | ||
"rust_icu_sys/icu_version_64_plus", | ||
"rust_icu_ustring/icu_version_64_plus", | ||
] | ||
icu_version_67_plus = [ | ||
"rust_icu_common/icu_version_67_plus", | ||
"rust_icu_sys/icu_version_67_plus", | ||
"rust_icu_ustring/icu_version_67_plus", | ||
] | ||
|
||
[badges] | ||
maintenance = { status = "actively-developed" } | ||
is-it-maintained-issue-resolution = { repository = "google/rust_icu" } | ||
is-it-maintained-open-issues = { repository = "google/rust_icu" } | ||
travis-ci = { repository = "google/rust_icu", branch = "master" } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../README.md |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
// Copyright 2020 Google LLC | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
//! # ICU number formatting support for rust | ||
//! | ||
//! Since 0.3.1 | ||
use { | ||
rust_icu_common as common, rust_icu_sys as sys, | ||
rust_icu_sys::versioned_function, | ||
rust_icu_sys::*, | ||
rust_icu_ustring as ustring, | ||
std::{convert::TryFrom, os::raw, ffi, ptr}, | ||
}; | ||
|
||
#[cfg(test)] | ||
mod tests { | ||
} |