mirror of
https://github.com/uuid-rs/uuid.git
synced 2025-10-02 15:24:57 +00:00
prepare for 1.0.0-alpha.1 release
This commit is contained in:
parent
89530dbb2e
commit
f657e5c2f4
@ -30,11 +30,10 @@ homepage = "https://github.com/uuid-rs/uuid"
|
|||||||
name = "uuid"
|
name = "uuid"
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
repository = "https://github.com/uuid-rs/uuid"
|
repository = "https://github.com/uuid-rs/uuid"
|
||||||
version = "0.8.1" # remember to update html_root_url in lib.rs
|
version = "1.0.0-alpha.1" # remember to update html_root_url in lib.rs
|
||||||
|
|
||||||
[package.metadata.docs.rs]
|
[package.metadata.docs.rs]
|
||||||
features = [ "serde", "slog", "v1", "v3", "v4", "v5" ]
|
features = ["serde", "arbitrary", "slog", "v1", "v3", "v4", "v5"]
|
||||||
default-target = "x86_64-pc-windows-msvc"
|
|
||||||
|
|
||||||
[package.metadata.playground]
|
[package.metadata.playground]
|
||||||
features = ["serde", "v1", "v3", "v4", "v5"]
|
features = ["serde", "v1", "v3", "v4", "v5"]
|
||||||
@ -54,7 +53,7 @@ repository = "uuid-rs/uuid"
|
|||||||
[features]
|
[features]
|
||||||
default = ["std"]
|
default = ["std"]
|
||||||
std = []
|
std = []
|
||||||
macro-diagnostics = ["uuid_macro"]
|
macro-diagnostics = ["uuid-macro-internal"]
|
||||||
|
|
||||||
v1 = ["atomic"]
|
v1 = ["atomic"]
|
||||||
v3 = ["md-5"]
|
v3 = ["md-5"]
|
||||||
@ -98,7 +97,7 @@ optional = true
|
|||||||
version = "0.9"
|
version = "0.9"
|
||||||
|
|
||||||
# Public: Re-exported
|
# Public: Re-exported
|
||||||
[dependencies.uuid_macro]
|
[dependencies.uuid-macro-internal]
|
||||||
path = "macros"
|
path = "macros"
|
||||||
optional = true
|
optional = true
|
||||||
|
|
||||||
|
@ -29,7 +29,7 @@ To get started with generating random UUIDs, add this to your `Cargo.toml`:
|
|||||||
|
|
||||||
```toml
|
```toml
|
||||||
[dependencies.uuid]
|
[dependencies.uuid]
|
||||||
version = "0.8"
|
version = "1"
|
||||||
features = ["v4", "fast-rng"]
|
features = ["v4", "fast-rng"]
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -113,6 +113,11 @@ flag through your environment to opt-in to unstable `uuid` features:
|
|||||||
RUSTFLAGS="--cfg uuid_unstable"
|
RUSTFLAGS="--cfg uuid_unstable"
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Minimum Supported Rust Version (MSRV)
|
||||||
|
|
||||||
|
The minimum supported Rust version for `uuid` is documented in
|
||||||
|
CI. It may be bumped in minor releases as necessary.
|
||||||
|
|
||||||
## References
|
## References
|
||||||
|
|
||||||
* [Wikipedia: Universally Unique Identifier]( http://en.wikipedia.org/wiki/Universally_unique_identifier)
|
* [Wikipedia: Universally Unique Identifier]( http://en.wikipedia.org/wiki/Universally_unique_identifier)
|
||||||
@ -120,7 +125,7 @@ RUSTFLAGS="--cfg uuid_unstable"
|
|||||||
|
|
||||||
[`wasm-bindgen`]: https://github.com/rustwasm/wasm-bindgen
|
[`wasm-bindgen`]: https://github.com/rustwasm/wasm-bindgen
|
||||||
|
|
||||||
[`Uuid`]: https://docs.rs/uuid/0.8.1/uuid/struct.Uuid.html
|
[`Uuid`]: https://docs.rs/uuid/1.0.0-alpha.1/uuid/struct.Uuid.html
|
||||||
|
|
||||||
---
|
---
|
||||||
# License
|
# License
|
||||||
|
@ -1,7 +1,18 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "uuid_macro"
|
name = "uuid-macro-internal"
|
||||||
version = "0.0.0"
|
version = "1.0.0-alpha.1"
|
||||||
edition = "2018"
|
edition = "2018"
|
||||||
|
authors = [
|
||||||
|
"QnnOkabayashi"
|
||||||
|
]
|
||||||
|
categories = [
|
||||||
|
"data-structures",
|
||||||
|
"no-std",
|
||||||
|
"parser-implementations",
|
||||||
|
"wasm"
|
||||||
|
]
|
||||||
|
description = "Private implementation details of the uuid! macro."
|
||||||
|
documentation = "https://docs.rs/uuid"
|
||||||
|
|
||||||
[lib]
|
[lib]
|
||||||
proc-macro = true
|
proc-macro = true
|
||||||
|
31
src/lib.rs
31
src/lib.rs
@ -35,8 +35,13 @@
|
|||||||
//! Add the following to your `Cargo.toml`:
|
//! Add the following to your `Cargo.toml`:
|
||||||
//!
|
//!
|
||||||
//! ```toml
|
//! ```toml
|
||||||
//! [dependencies]
|
//! [dependencies.uuid]
|
||||||
//! uuid = { version = "0.8", features = ["v4"] }
|
//! version = "1.0.0-alpha.1"
|
||||||
|
//! features = [
|
||||||
|
//! "v4", # Lets you generate random UUIDs
|
||||||
|
//! "fast-rng", # Use a faster (but still sufficiently random) RNG
|
||||||
|
//! "macro-diagnostics", # Enable better diagnostics for compile-time UUIDs
|
||||||
|
//! ]
|
||||||
//! ```
|
//! ```
|
||||||
//!
|
//!
|
||||||
//! When you want a UUID, you can generate one:
|
//! When you want a UUID, you can generate one:
|
||||||
@ -52,6 +57,14 @@
|
|||||||
//! # }
|
//! # }
|
||||||
//! ```
|
//! ```
|
||||||
//!
|
//!
|
||||||
|
//! If you have a UUID value you can use it inline:
|
||||||
|
//!
|
||||||
|
//! ```
|
||||||
|
//! use uuid::{uuid, Uuid};
|
||||||
|
//!
|
||||||
|
//! const ID: Uuid = uuid!("67e55044-10b1-426f-9247-bb680e5fe0c8");
|
||||||
|
//! ```
|
||||||
|
//!
|
||||||
//! # Dependencies
|
//! # Dependencies
|
||||||
//!
|
//!
|
||||||
//! By default, this crate depends on nothing but `std` and can parse and format
|
//! By default, this crate depends on nothing but `std` and can parse and format
|
||||||
@ -83,21 +96,21 @@
|
|||||||
//!
|
//!
|
||||||
//! ```toml
|
//! ```toml
|
||||||
//! [dependencies]
|
//! [dependencies]
|
||||||
//! uuid = "0.8"
|
//! uuid = "1"
|
||||||
//! ```
|
//! ```
|
||||||
//!
|
//!
|
||||||
//! To activate various features, use syntax like:
|
//! To activate various features, use syntax like:
|
||||||
//!
|
//!
|
||||||
//! ```toml
|
//! ```toml
|
||||||
//! [dependencies]
|
//! [dependencies]
|
||||||
//! uuid = { version = "0.8", features = ["serde", "v4", "fast-rng"] }
|
//! uuid = { version = "1", features = ["serde", "v4", "fast-rng"] }
|
||||||
//! ```
|
//! ```
|
||||||
//!
|
//!
|
||||||
//! You can disable default features with:
|
//! You can disable default features with:
|
||||||
//!
|
//!
|
||||||
//! ```toml
|
//! ```toml
|
||||||
//! [dependencies]
|
//! [dependencies]
|
||||||
//! uuid = { version = "0.8", default-features = false }
|
//! uuid = { version = "1", default-features = false }
|
||||||
//! ```
|
//! ```
|
||||||
//!
|
//!
|
||||||
//! ## Unstable features
|
//! ## Unstable features
|
||||||
@ -127,7 +140,7 @@
|
|||||||
//!
|
//!
|
||||||
//! ```toml
|
//! ```toml
|
||||||
//! [dependencies]
|
//! [dependencies]
|
||||||
//! uuid = { version = "0.8", features = ["v4", "js"] }
|
//! uuid = { version = "1", features = ["v4", "js"] }
|
||||||
//! ```
|
//! ```
|
||||||
//!
|
//!
|
||||||
//! You don't need the `js` feature to use `uuid` in WebAssembly if you're
|
//! You don't need the `js` feature to use `uuid` in WebAssembly if you're
|
||||||
@ -140,7 +153,7 @@
|
|||||||
//!
|
//!
|
||||||
//! ```toml
|
//! ```toml
|
||||||
//! [dependencies]
|
//! [dependencies]
|
||||||
//! uuid = { version = "0.8", default-features = false }
|
//! uuid = { version = "1", default-features = false }
|
||||||
//! ```
|
//! ```
|
||||||
//!
|
//!
|
||||||
//! Some additional features are supported in no-std environments though:
|
//! Some additional features are supported in no-std environments though:
|
||||||
@ -203,7 +216,7 @@
|
|||||||
#![doc(
|
#![doc(
|
||||||
html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
|
html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
|
||||||
html_favicon_url = "https://www.rust-lang.org/favicon.ico",
|
html_favicon_url = "https://www.rust-lang.org/favicon.ico",
|
||||||
html_root_url = "https://docs.rs/uuid/0.8.1"
|
html_root_url = "https://docs.rs/uuid/1.0.0-alpha.1"
|
||||||
)]
|
)]
|
||||||
|
|
||||||
#[cfg(any(feature = "std", test))]
|
#[cfg(any(feature = "std", test))]
|
||||||
@ -246,7 +259,7 @@ mod macros;
|
|||||||
|
|
||||||
#[doc(hidden)]
|
#[doc(hidden)]
|
||||||
#[cfg(feature = "macro-diagnostics")]
|
#[cfg(feature = "macro-diagnostics")]
|
||||||
pub extern crate uuid_macro;
|
pub extern crate uuid_macro_internal;
|
||||||
|
|
||||||
use crate::std::convert;
|
use crate::std::convert;
|
||||||
|
|
||||||
|
@ -5,7 +5,7 @@ macro_rules! define_uuid_macro {
|
|||||||
#[macro_export]
|
#[macro_export]
|
||||||
macro_rules! uuid {
|
macro_rules! uuid {
|
||||||
($uuid:literal) => {{
|
($uuid:literal) => {{
|
||||||
$crate::Uuid::from_bytes($crate::uuid_macro::parse_lit!($uuid))
|
$crate::Uuid::from_bytes($crate::uuid_macro_internal::parse_lit!($uuid))
|
||||||
}};
|
}};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user