Skip to content

Commit 6b2c6a3

Browse files
committed
add docs.rs configuration for better documentation building
1 parent f33304c commit 6b2c6a3

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

crates/mpsgraph-rs/Cargo.toml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,3 +46,11 @@ path = "examples/simple_compile.rs"
4646

4747
[package.metadata.macos]
4848
frameworks = ["MetalPerformanceShaders", "Metal", "Foundation"]
49+
50+
[package.metadata.docs.rs]
51+
# Disable default features for docs.rs build
52+
no-default-features = true
53+
# Skip running tests for docs.rs
54+
rustdoc-args = ["--cfg", "docsrs"]
55+
# Target platforms
56+
targets = ["x86_64-apple-darwin", "aarch64-apple-darwin"]

crates/mpsgraph-tools-rs/Cargo.toml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,14 @@ objc2-foundation = "0.3.0"
5151
[target.'cfg(any(target_os = "macos", target_os = "ios", target_os = "tvos", target_os = "watchos", target_os = "visionos"))'.dependencies]
5252
# MacOS/iOS specific dependencies would go here if needed
5353

54+
[package.metadata.docs.rs]
55+
# Disable default features for docs.rs build
56+
no-default-features = true
57+
# Skip running tests for docs.rs
58+
rustdoc-args = ["--cfg", "docsrs"]
59+
# Target platforms
60+
targets = ["x86_64-apple-darwin", "aarch64-apple-darwin"]
61+
5462
[dev-dependencies]
5563
rand = "0.8.0"
5664

0 commit comments

Comments
 (0)