Skip to content

Commit 74d2e7b

Browse files
committed
Fix docs.rs docs build
1 parent 7853264 commit 74d2e7b

File tree

5 files changed

+24
-3
lines changed

5 files changed

+24
-3
lines changed

CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
## [0.2.14] - 2025-10-03
11+
### Fixed
12+
- Guarded the nightly-only `doc_auto_cfg` attribute behind a compiler channel
13+
probe so documentation builds on docs.rs no longer fail on stable toolchains.
14+
15+
### Changed
16+
- Added a lightweight build-time check using `version_check` to conditionally
17+
enable nightly-only documentation features without impacting stable
18+
consumers.
19+
1020
## [0.2.13] - 2025-10-01
1121
### Changed
1222
- Upgraded to `masterror` 0.24 across the workspace, ensuring the SDK and demo

Cargo.lock

Lines changed: 2 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "telegram-webapp-sdk"
3-
version = "0.2.13"
3+
version = "0.2.14"
44
rust-version = "1.90"
55
edition = "2024"
66
description = "Telegram WebApp SDK for Rust"
@@ -57,6 +57,9 @@ urlencoding = { version = "2", optional = true }
5757
inventory = { workspace = true, optional = true }
5858
toml = "0.9"
5959

60+
[build-dependencies]
61+
version_check = "0.9"
62+
6063
[dependencies.yew]
6164
version = "0.21"
6265
optional = true

build.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
fn main() {
2+
println!("cargo:rustc-check-cfg=cfg(has_doc_auto_cfg)");
3+
4+
if version_check::Channel::read().is_some_and(|channel| channel.supports_features()) {
5+
println!("cargo:rustc-cfg=has_doc_auto_cfg");
6+
}
7+
}

src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#![doc = include_str!("../README.md")]
2-
#![cfg_attr(docsrs, feature(doc_auto_cfg))]
2+
#![cfg_attr(all(docsrs, has_doc_auto_cfg), feature(doc_auto_cfg))]
33

44
pub mod api;
55
pub mod core;

0 commit comments

Comments
 (0)