Skip to content

Commit

Permalink
docs: use doc_auto_cfg on docs.rs
Browse files Browse the repository at this point in the history
  • Loading branch information
blckngm authored and jjyr committed May 9, 2023
1 parent b29a15e commit 723226f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ description = "This library contains serveral modules help you write CKB contrac
exclude = ["docs"]

[package.metadata.docs.rs]
all-features = true
# All features except simulator and rustc-dep-of-std.
features = ["allocator", "ckb-types", "dlopen-c", "dummy-libc", "ckb2023"]
rustdoc-args = ["--cfg", "docsrs"]

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

Expand Down
1 change: 1 addition & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
//! * `default_alloc!` and `libc_alloc!` macro: defines global allocator for no-std rust

#![no_std]
#![cfg_attr(docsrs, feature(doc_auto_cfg))]

#[cfg(not(feature = "rustc-dep-of-std"))]
extern crate alloc;
Expand Down

0 comments on commit 723226f

Please sign in to comment.