capi: fix docs.rs build

This commit is contained in:
chyyran 2022-12-05 02:11:52 -05:00
parent 0366644218
commit 12aed57dc9

View file

@ -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)