From 12aed57dc9160ebc8ce6e0d9abb1eac54b5dc596 Mon Sep 17 00:00:00 2001 From: chyyran Date: Mon, 5 Dec 2022 02:11:52 -0500 Subject: [PATCH] capi: fix docs.rs build --- librashader-capi/build.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/librashader-capi/build.rs b/librashader-capi/build.rs index da4cd7a..8344677 100644 --- a/librashader-capi/build.rs +++ b/librashader-capi/build.rs @@ -3,6 +3,11 @@ use std::fs::File; use std::io::{BufWriter, Write}; pub fn main() { + // Do not update files on docsrs + if env::var("DOCS_RS").is_ok() { + return; + } + let crate_dir = env::var("CARGO_MANIFEST_DIR").unwrap(); let mut buf = BufWriter::new(Vec::new()); cbindgen::generate(crate_dir)