prepare for 1.0.0-alpha.1 release

This commit is contained in:
KodrAus 2021-11-02 10:28:28 +10:00 committed by Ashley Mannix
parent 89530dbb2e
commit f657e5c2f4
5 changed files with 47 additions and 19 deletions

View File

@ -30,11 +30,10 @@ homepage = "https://github.com/uuid-rs/uuid"
name = "uuid"
readme = "README.md"
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]
features = [ "serde", "slog", "v1", "v3", "v4", "v5" ]
default-target = "x86_64-pc-windows-msvc"
features = ["serde", "arbitrary", "slog", "v1", "v3", "v4", "v5"]
[package.metadata.playground]
features = ["serde", "v1", "v3", "v4", "v5"]
@ -54,7 +53,7 @@ repository = "uuid-rs/uuid"
[features]
default = ["std"]
std = []
macro-diagnostics = ["uuid_macro"]
macro-diagnostics = ["uuid-macro-internal"]
v1 = ["atomic"]
v3 = ["md-5"]
@ -98,7 +97,7 @@ optional = true
version = "0.9"
# Public: Re-exported
[dependencies.uuid_macro]
[dependencies.uuid-macro-internal]
path = "macros"
optional = true

View File

@ -29,7 +29,7 @@ To get started with generating random UUIDs, add this to your `Cargo.toml`:
```toml
[dependencies.uuid]
version = "0.8"
version = "1"
features = ["v4", "fast-rng"]
```
@ -113,6 +113,11 @@ flag through your environment to opt-in to unstable `uuid` features:
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
* [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
[`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

View File

@ -1,7 +1,18 @@
[package]
name = "uuid_macro"
version = "0.0.0"
name = "uuid-macro-internal"
version = "1.0.0-alpha.1"
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]
proc-macro = true

View File

@ -35,8 +35,13 @@
//! Add the following to your `Cargo.toml`:
//!
//! ```toml
//! [dependencies]
//! uuid = { version = "0.8", features = ["v4"] }
//! [dependencies.uuid]
//! 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:
@ -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
//!
//! By default, this crate depends on nothing but `std` and can parse and format
@ -83,21 +96,21 @@
//!
//! ```toml
//! [dependencies]
//! uuid = "0.8"
//! uuid = "1"
//! ```
//!
//! To activate various features, use syntax like:
//!
//! ```toml
//! [dependencies]
//! uuid = { version = "0.8", features = ["serde", "v4", "fast-rng"] }
//! uuid = { version = "1", features = ["serde", "v4", "fast-rng"] }
//! ```
//!
//! You can disable default features with:
//!
//! ```toml
//! [dependencies]
//! uuid = { version = "0.8", default-features = false }
//! uuid = { version = "1", default-features = false }
//! ```
//!
//! ## Unstable features
@ -127,7 +140,7 @@
//!
//! ```toml
//! [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
@ -140,7 +153,7 @@
//!
//! ```toml
//! [dependencies]
//! uuid = { version = "0.8", default-features = false }
//! uuid = { version = "1", default-features = false }
//! ```
//!
//! Some additional features are supported in no-std environments though:
@ -203,7 +216,7 @@
#![doc(
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_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))]
@ -246,7 +259,7 @@ mod macros;
#[doc(hidden)]
#[cfg(feature = "macro-diagnostics")]
pub extern crate uuid_macro;
pub extern crate uuid_macro_internal;
use crate::std::convert;

View File

@ -5,7 +5,7 @@ macro_rules! define_uuid_macro {
#[macro_export]
macro_rules! uuid {
($uuid:literal) => {{
$crate::Uuid::from_bytes($crate::uuid_macro::parse_lit!($uuid))
$crate::Uuid::from_bytes($crate::uuid_macro_internal::parse_lit!($uuid))
}};
}