Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.DS_Store
*.pyc
*.rs.bk
*.rs.rustfmt
Expand Down
13 changes: 12 additions & 1 deletion unic/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,18 @@ exclude = []

[features]
default = []
unstable = ["unic-common/unstable"] # Rust nightly features
# Rust nightly features
unstable = [
"unic-bidi/unstable",
"unic-char/unstable",
"unic-common/unstable",
"unic-emoji/unstable",
"unic-idna/unstable",
"unic-normal/unstable",
"unic-segment/unstable",
"unic-ucd/unstable",
]

bench_it = ["unic-bidi/bench_it"]
serde = ["unic-bidi/serde"]

Expand Down
3 changes: 3 additions & 0 deletions unic/bidi/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ exclude = [
[features]
default = []
bench_it = []
unstable = [
"unic-ucd-bidi/unstable",
]

[dependencies]
matches = "0.1"
Expand Down
16 changes: 8 additions & 8 deletions unic/bidi/src/bidi_info.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@ use std::ops::Range;
use unic_ucd_bidi::BidiClass;
use unic_ucd_bidi::bidi_class::abbr_names::*;

use explicit;
use format_chars;
use implicit;
use level;
use prepare;

use level::{Level, LTR_LEVEL, RTL_LEVEL};
use prepare::LevelRun;
use super::explicit;
use super::format_chars;
use super::implicit;
use super::level;
use super::prepare;

use super::level::{Level, LTR_LEVEL, RTL_LEVEL};
use super::prepare::LevelRun;

/// Bidi information about a single paragraph
#[derive(Clone, Debug, Eq, PartialEq, Hash)]
Expand Down
8 changes: 4 additions & 4 deletions unic/bidi/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -83,19 +83,19 @@ pub use unic_ucd_bidi::{bidi_class, BidiClass, BidiClassCategory};
pub use unic_ucd_bidi::UNICODE_VERSION;

mod pkg_info;
pub use pkg_info::{PKG_DESCRIPTION, PKG_NAME, PKG_VERSION};
pub use self::pkg_info::{PKG_DESCRIPTION, PKG_NAME, PKG_VERSION};

pub mod format_chars;

pub mod level;
pub use level::Level;
pub use self::level::Level;

mod bidi_info;
pub use bidi_info::{BidiInfo, ParagraphInfo};
pub use self::bidi_info::{BidiInfo, ParagraphInfo};

mod explicit;

mod implicit;

mod prepare;
pub use prepare::LevelRun;
pub use self::prepare::LevelRun;
13 changes: 9 additions & 4 deletions unic/char/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,20 @@ readme = "README.md"
# No tests/benches that depends on /data/
exclude = []

[features]
default = []
std = ["unic-char-range/std"]

[dependencies]
unic-char-basics = { path = "basics/", version = "0.7.0" }
unic-char-property = { path = "property/", version = "0.7.0" }
unic-char-range = { path = "range/", version = "0.7.0" }

[features]
default = []
std = ["unic-char-range/std"]
unstable = [
"unic-char-basics/unstable",
"unic-char-property/unstable",
"unic-char-range/unstable",
]

[badges]
maintenance = { status = "actively-developed" }
is-it-maintained-issue-resolution = { repository = "behnam/rust-unic" }
Expand Down
4 changes: 4 additions & 0 deletions unic/char/basics/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ exclude = []
[dev-dependencies]
unic-char-range = { path = "../range/", version = "0.7.0" }

[features]
default = []
unstable = []

[badges]
maintenance = { status = "actively-developed" }
is-it-maintained-issue-resolution = { repository = "behnam/rust-unic" }
Expand Down
8 changes: 4 additions & 4 deletions unic/char/basics/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,13 +63,13 @@
extern crate core;

mod pkg_info;
pub use pkg_info::{PKG_DESCRIPTION, PKG_NAME, PKG_VERSION};
pub use self::pkg_info::{PKG_DESCRIPTION, PKG_NAME, PKG_VERSION};

pub mod noncharacter;
pub use noncharacter::is_noncharacter;
pub use self::noncharacter::is_noncharacter;

pub mod private_use;
pub use private_use::is_private_use;
pub use self::private_use::is_private_use;

pub mod notation;
pub use notation::unicode_notation;
pub use self::notation::unicode_notation;
7 changes: 7 additions & 0 deletions unic/char/property/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,13 @@ exclude = []
[dependencies]
unic-char-range = { path = "../range/", version = "0.7.0" }

[features]
default = []
unstable = [
"unic-char-range/unstable",
]


[badges]
maintenance = { status = "actively-developed" }
is-it-maintained-issue-resolution = { repository = "behnam/rust-unic" }
Expand Down
4 changes: 2 additions & 2 deletions unic/char/property/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,13 @@
extern crate unic_char_range;

mod pkg_info;
pub use pkg_info::{PKG_DESCRIPTION, PKG_NAME, PKG_VERSION};
pub use self::pkg_info::{PKG_DESCRIPTION, PKG_NAME, PKG_VERSION};

mod property;
pub use self::property::{CharProperty, PartialCharProperty, TotalCharProperty};

mod range_types;
pub use range_types::{
pub use self::range_types::{
BinaryCharProperty,
CustomCharProperty,
EnumeratedCharProperty,
Expand Down
2 changes: 1 addition & 1 deletion unic/char/range/src/iter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

use core::{char, ops};

use {step, CharRange};
use super::{step, CharRange};

const SURROGATE_RANGE: ops::Range<u32> = 0xD800..0xE000;

Expand Down
6 changes: 3 additions & 3 deletions unic/char/range/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,13 @@
extern crate core;

mod pkg_info;
pub use pkg_info::{PKG_DESCRIPTION, PKG_NAME, PKG_VERSION};
pub use self::pkg_info::{PKG_DESCRIPTION, PKG_NAME, PKG_VERSION};

mod iter;
pub use iter::CharIter;
pub use self::iter::CharIter;

mod range;
pub use range::CharRange;
pub use self::range::CharRange;

mod macros;

Expand Down
2 changes: 1 addition & 1 deletion unic/char/range/src/range.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ use core::{char, cmp};
use std::collections::Bound;

use self::cmp::Ordering;
use CharIter;
use super::CharIter;

/// A range of unicode code points.
///
Expand Down
2 changes: 1 addition & 1 deletion unic/char/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ pub extern crate unic_char_property as property;
pub extern crate unic_char_range as range;

mod pkg_info;
pub use pkg_info::{PKG_DESCRIPTION, PKG_NAME, PKG_VERSION};
pub use self::pkg_info::{PKG_DESCRIPTION, PKG_NAME, PKG_VERSION};
6 changes: 4 additions & 2 deletions unic/common/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@
#![no_std]
#![forbid(bad_style, future_incompatible, missing_debug_implementations, missing_docs,
unconditional_recursion, unsafe_code, unused)]
#![cfg_attr(feature = "unstable", feature(unicode))]
#![cfg_attr(feature = "unstable", feature(unicode_version))]
#![cfg_attr(unstable, feature("unstable"))]


//! # UNIC — Common Utilities
//!
Expand All @@ -21,6 +23,6 @@
//! components.

mod pkg_info;
pub use pkg_info::{PKG_DESCRIPTION, PKG_NAME, PKG_VERSION};
pub use self::pkg_info::{PKG_DESCRIPTION, PKG_NAME, PKG_VERSION};

pub mod version;
6 changes: 6 additions & 0 deletions unic/emoji/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,12 @@ exclude = []
[dependencies]
unic-emoji-char = { path = "char/", version = "0.7.0" }

[features]
default = []
unstable = [
"unic-emoji-char/unstable",
]

[badges]
maintenance = { status = "actively-developed" }
is-it-maintained-issue-resolution = { repository = "behnam/rust-unic" }
Expand Down
8 changes: 8 additions & 0 deletions unic/emoji/char/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,14 @@ unic-char-property = { path = "../../char/property/", version = "0.7.0" }
unic-char-range = { path = "../../char/range", version = "0.7.0" }
unic-ucd-version = { path = "../../ucd/version/", version = "0.7.0" }

[features]
default = []
unstable = [
"unic-char-property/unstable",
"unic-char-range/unstable",
"unic-ucd-version/unstable",
]

[badges]
maintenance = { status = "actively-developed" }
is-it-maintained-issue-resolution = { repository = "behnam/rust-unic" }
Expand Down
14 changes: 7 additions & 7 deletions unic/emoji/char/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,22 +23,22 @@ extern crate unic_char_range;
extern crate unic_ucd_version;

mod pkg_info;
pub use pkg_info::{PKG_DESCRIPTION, PKG_NAME, PKG_VERSION};
pub use self::pkg_info::{PKG_DESCRIPTION, PKG_NAME, PKG_VERSION};

mod emoji_version;
pub use emoji_version::{UnicodeVersion, EMOJI_VERSION};
pub use self::emoji_version::{UnicodeVersion, EMOJI_VERSION};

mod emoji;
pub use emoji::{is_emoji, Emoji};
pub use self::emoji::{is_emoji, Emoji};

mod emoji_component;
pub use emoji_component::{is_emoji_component, EmojiComponent};
pub use self::emoji_component::{is_emoji_component, EmojiComponent};

mod emoji_modifier;
pub use emoji_modifier::{is_emoji_modifier, EmojiModifier};
pub use self::emoji_modifier::{is_emoji_modifier, EmojiModifier};

mod emoji_modifier_base;
pub use emoji_modifier_base::{is_emoji_modifier_base, EmojiModifierBase};
pub use self::emoji_modifier_base::{is_emoji_modifier_base, EmojiModifierBase};

mod emoji_presentation;
pub use emoji_presentation::{is_emoji_presentation, EmojiPresentation};
pub use self::emoji_presentation::{is_emoji_presentation, EmojiPresentation};
4 changes: 2 additions & 2 deletions unic/emoji/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@
pub extern crate unic_emoji_char as char;

mod pkg_info;
pub use pkg_info::{PKG_DESCRIPTION, PKG_NAME, PKG_VERSION};
pub use self::pkg_info::{PKG_DESCRIPTION, PKG_NAME, PKG_VERSION};

pub use char::EMOJI_VERSION;
pub use self::char::EMOJI_VERSION;
11 changes: 11 additions & 0 deletions unic/idna/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,17 @@ unic-ucd-bidi = { path = "../ucd/bidi/", version = "0.7.0" }
unic-ucd-normal = { path = "../ucd/normal/", version = "0.7.0" }
unic-ucd-version = { path = "../ucd/version/", version = "0.7.0" }

[features]
default = []
unstable = [
"unic-idna-punycode/unstable",
"unic-idna-mapping/unstable",
"unic-normal/unstable",
"unic-ucd-bidi/unstable",
"unic-ucd-normal/unstable",
"unic-ucd-version/unstable",
]

[badges]
maintenance = { status = "actively-developed" }
is-it-maintained-issue-resolution = { repository = "behnam/rust-unic" }
Expand Down
4 changes: 4 additions & 0 deletions unic/idna/mapping/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ unic-char-range = { path = "../../char/range/", version = "0.7.0" }
unic-char-property = { path = "../../char/property/", version = "0.7.0" }
unic-ucd-version = { path = "../../ucd/version/", version = "0.7.0" }

[features]
default = []
unstable = []

[badges]
maintenance = { status = "actively-developed" }
is-it-maintained-issue-resolution = { repository = "behnam/rust-unic" }
Expand Down
4 changes: 2 additions & 2 deletions unic/idna/mapping/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ mod mapping;
use unic_ucd_version::UnicodeVersion;

mod pkg_info;
pub use pkg_info::{PKG_DESCRIPTION, PKG_NAME, PKG_VERSION};
pub use self::pkg_info::{PKG_DESCRIPTION, PKG_NAME, PKG_VERSION};

pub use mapping::Mapping;
pub use self::mapping::Mapping;

/// The version of [Unicode IDNA Compatibility Processing](https://www.unicode.org/reports/tr46/)
pub const UNICODE_VERSION: UnicodeVersion = include!("../tables/unicode_version.rsv");
2 changes: 1 addition & 1 deletion unic/idna/mapping/src/mapping.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ mod tests {

#[test]
fn test_mapping() {
use Mapping::*;
use super::Mapping::*;

assert_eq!(Mapping::of('\u{0}'), DisallowedStd3Valid);
assert_eq!(Mapping::of('-'), Valid);
Expand Down
4 changes: 4 additions & 0 deletions unic/idna/punycode/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ exclude = ["tests/punycode_tests.rs"]
[dev-dependencies]
rustc-serialize = "0.3"

[features]
default = []
unstable = []

[badges]
maintenance = { status = "actively-developed" }
is-it-maintained-issue-resolution = { repository = "behnam/rust-unic" }
Expand Down
2 changes: 1 addition & 1 deletion unic/idna/punycode/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ use std::u32;
use std::ascii::AsciiExt;

mod pkg_info;
pub use pkg_info::{PKG_DESCRIPTION, PKG_NAME, PKG_VERSION};
pub use self::pkg_info::{PKG_DESCRIPTION, PKG_NAME, PKG_VERSION};

// Bootstring parameters for Punycode
static BASE: u32 = 36;
Expand Down
16 changes: 10 additions & 6 deletions unic/idna/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
#![forbid(bad_style, future_incompatible, missing_debug_implementations, missing_docs,
unconditional_recursion, unsafe_code, unused)]
#![deny(unused_imports)]
#![cfg_attr(unstable, feature("unstable"))]

//! # UNIC — Unicode IDNA Compatibility Processing
//!
Expand Down Expand Up @@ -50,12 +51,15 @@ extern crate unic_ucd_normal;
extern crate unic_idna_mapping as mapping;
extern crate unic_idna_punycode as punycode;

mod pkg_info;
pub use pkg_info::{PKG_DESCRIPTION, PKG_NAME, PKG_VERSION};
#[cfg(unstable)]
pub use crate::mapping::UNICODE_VERSION;
#[cfg(not(unstable))]
pub use self::mapping::UNICODE_VERSION;

pub use mapping::UNICODE_VERSION;
mod pkg_info;
pub use self::pkg_info::{PKG_DESCRIPTION, PKG_NAME, PKG_VERSION};

mod process;
pub use process::{Errors, Flags};
pub use process::{to_ascii, to_unicode};
pub use process::PUNYCODE_PREFIX;
pub use self::process::{Errors, Flags};
pub use self::process::{to_ascii, to_unicode};
pub use self::process::PUNYCODE_PREFIX;
Loading