-
-
Notifications
You must be signed in to change notification settings - Fork 60
doc: cross-platform with target tags #237
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 6 commits
bb49c91
4602684
0c473d7
254d729
6f16ecb
a994584
3d8da96
ac2a3b4
a40bd95
8a5c6dd
307e575
09c9c0d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,13 @@ | ||
#!/bin/bash | ||
if [[ "$OSTYPE" == "linux"* ]]; then | ||
cargo doc --no-deps --features=linux-native-sync-persistent $OPEN_DOCS | ||
cargo doc --no-deps --features=sync-secret-service $OPEN_DOCS | ||
cargo doc --no-deps --features=linux-native $OPEN_DOCS | ||
elif [[ "$OSTYPE" == "darwin"* ]]; then | ||
cargo doc --no-deps --features=linux-native --target aarch64-unknown-linux-musl $OPEN_DOCS | ||
cargo doc --no-deps --features=windows-native --target aarch64-pc-windows-msvc $OPEN_DOCS | ||
cargo doc --no-deps --features=apple-native --target aarch64-apple-darwin $OPEN_DOCS | ||
cargo doc --no-deps --features=apple-native --target aarch64-apple-ios $OPEN_DOCS | ||
fi | ||
|
||
FEATURES="apple-native, windows-native, linux-native-sync-persistent, crypto-rust" | ||
TARGETS=( | ||
"x86_64-unknown-linux-gnu" | ||
"aarch64-apple-darwin" | ||
"aarch64-apple-ios" | ||
"x86_64-pc-windows-msvc" | ||
) | ||
|
||
for TARGET in "${TARGETS[@]}"; do | ||
cargo +nightly doc --no-deps --features "$FEATURES" --target "$TARGET" -Zbuild-std $OPEN_DOCS | ||
done |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
#![feature(doc_cfg)] | ||
brotskydotcom marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
/*! | ||
|
||
# Keyring | ||
|
@@ -203,7 +204,11 @@ compile_error!("This crate cannot use both the sync and async versions of any cr | |
// | ||
// pick the *nix keystore | ||
// | ||
#[cfg(all(target_os = "linux", feature = "linux-native"))] | ||
#[cfg(any( | ||
all(target_os = "linux", feature = "linux-native"), | ||
all(target_os = "linux", feature = "linux-native-sync-persistent", doc) | ||
))] | ||
#[doc(cfg(all(target_os = "linux")))] | ||
pub mod keyutils; | ||
#[cfg(all( | ||
target_os = "linux", | ||
|
@@ -213,10 +218,14 @@ pub mod keyutils; | |
))] | ||
pub use keyutils as default; | ||
|
||
#[cfg(all( | ||
any(target_os = "linux", target_os = "freebsd", target_os = "openbsd"), | ||
any(feature = "sync-secret-service", feature = "async-secret-service"), | ||
#[cfg(any( | ||
all( | ||
any(target_os = "linux", target_os = "freebsd", target_os = "openbsd"), | ||
any(feature = "sync-secret-service", feature = "async-secret-service"), | ||
), | ||
all(target_os = "linux", feature = "linux-native-sync-persistent", doc), | ||
|
||
))] | ||
#[doc(cfg(any(target_os = "linux", target_os = "freebsd", target_os = "openbsd")))] | ||
pub mod secret_service; | ||
#[cfg(all( | ||
any(target_os = "linux", target_os = "freebsd", target_os = "openbsd"), | ||
|
@@ -228,13 +237,17 @@ pub mod secret_service; | |
))] | ||
pub use secret_service as default; | ||
|
||
#[cfg(all( | ||
target_os = "linux", | ||
any( | ||
feature = "linux-native-sync-persistent", | ||
feature = "linux-native-async-persistent", | ||
) | ||
#[cfg(any( | ||
all( | ||
target_os = "linux", | ||
any( | ||
feature = "linux-native-sync-persistent", | ||
feature = "linux-native-async-persistent", | ||
) | ||
), | ||
all(target_os = "linux", feature = "linux-native-sync-persistent", doc), | ||
|
||
))] | ||
#[doc(cfg(all(target_os = "linux")))] | ||
pub mod keyutils_persistent; | ||
#[cfg(all( | ||
target_os = "linux", | ||
|
@@ -265,13 +278,15 @@ pub use mock as default; | |
// pick the Apple keystore | ||
// | ||
#[cfg(all(target_os = "macos", feature = "apple-native"))] | ||
#[doc(cfg(all(target_os = "macos")))] | ||
pub mod macos; | ||
#[cfg(all(target_os = "macos", feature = "apple-native"))] | ||
pub use macos as default; | ||
#[cfg(all(target_os = "macos", not(feature = "apple-native")))] | ||
pub use mock as default; | ||
|
||
#[cfg(all(target_os = "ios", feature = "apple-native"))] | ||
#[doc(cfg(all(target_os = "ios")))] | ||
pub mod ios; | ||
#[cfg(all(target_os = "ios", feature = "apple-native"))] | ||
pub use ios as default; | ||
|
@@ -282,6 +297,7 @@ pub use mock as default; | |
// pick the Windows keystore | ||
// | ||
#[cfg(all(target_os = "windows", feature = "windows-native"))] | ||
#[doc(cfg(all(target_os = "windows")))] | ||
pub mod windows; | ||
#[cfg(all(target_os = "windows", not(feature = "windows-native")))] | ||
pub use mock as default; | ||
|
Uh oh!
There was an error while loading. Please reload this page.