Use feature flag in docs.rs env because of proc-macro-error crate failures

This commit is contained in:
Gusto 2023-12-05 17:11:59 +02:00
parent 4ceca08f4a
commit 1edc69fff0
No known key found for this signature in database
2 changed files with 6 additions and 1 deletions

View File

@ -30,6 +30,10 @@ exclude = [
[lib]
crate-type = ["rlib"]
# Prevent building Waku go when building docs on docs.rs.
[package.metadata.docs.rs]
features = ["private-docs-rs"]
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]

View File

@ -95,7 +95,8 @@ fn main() {
let project_dir = PathBuf::from(env::var("CARGO_MANIFEST_DIR").unwrap());
// Skip building go waku binary if in Rust Docs environment.
if std::env::var("DOCS_RS").is_err() {
// TODO: use DOCS_RS env var (proc-macro failure needs to be resolved).
if !cfg!(feature = "private-docs-rs") {
let go_bin = get_go_bin();
build_go_waku_lib(&go_bin, &project_dir);
}