5 Commits

Author SHA1 Message Date
1f4e552c52 try to fix doc build 2024-06-01 20:28:54 +02:00
6cf745c316 try to fix libcsp-sys docs build 2024-06-01 20:27:41 +02:00
f1ec2158d9 add badges for crates 2024-06-01 19:55:10 +02:00
6f8ffb7412 remove empty live file 2024-06-01 19:53:26 +02:00
4bd6d1cb88 comment for Cargo.toml 2024-06-01 19:52:18 +02:00
8 changed files with 29 additions and 10 deletions

View File

@ -1,3 +1,6 @@
[![Crates.io](https://img.shields.io/crates/v/libcsp)](https://crates.io/crates/libcsp)
[![docs.rs](https://img.shields.io/docsrs/libcsp)](https://docs.rs/libcsp)
libcsp-rust
=========

View File

@ -4,6 +4,8 @@ version = "0.1.0"
edition = "2021"
[dependencies]
# Must use local verion here, otherwise there will be multiple versions of `libcsp-sys`, and
# cargo can not deal with this due to the link section.
libcsp = { version = "0.1", path = ".." }
[build-dependencies]

View File

@ -1 +0,0 @@

View File

@ -1,3 +1,6 @@
[![Crates.io](https://img.shields.io/crates/v/libcsp-cargo-build)](https://crates.io/crates/libcsp-cargo-build)
[![docs.rs](https://img.shields.io/docsrs/libcsp-cargo-build)](https://docs.rs/libcsp-cargo-build)
libcsp-cargo-build
========

View File

@ -8,6 +8,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
# [unreleased]
# [v0.1.1] 2024-06-01
Try to fix the documentation build.
# [v0.1.0] 2024-06-01
Initial release

View File

@ -1,6 +1,6 @@
[package]
name = "libcsp-sys"
version = "0.1.0"
version = "0.1.1"
edition = "2021"
authors = ["Robin Mueller <muellerr@irs.uni-stuttgart.de>"]
description = "FFI bindings for libcsp"

View File

@ -1,3 +1,6 @@
[![Crates.io](https://img.shields.io/crates/v/libcsp-sys)](https://crates.io/crates/libcsp-sys)
[![docs.rs](https://img.shields.io/docsrs/libcsp-sys)](https://docs.rs/libcsp-sys)
libcsp-sys
========

View File

@ -15,19 +15,24 @@ fn main() {
println!("cargo:rustc-link-lib=csp");
}
let out_path = env::var("OUT_DIR").unwrap();
let csp_conf_dir = match env::var(ENV_KEY_CSP_CONFIG_DIR) {
Ok(conf_path) => conf_path,
Err(_e) => {
println!(
let mut csp_conf_path = if std::env::var("DOCS_RS").is_ok() {
PathBuf::from("./templates")
} else {
match env::var(ENV_KEY_CSP_CONFIG_DIR) {
Ok(conf_path) => conf_path.into(),
Err(_e) => {
println!(
"cargo:warning={} not set, using CARGO_MANIFEST_DIR to search for autoconfig.rs",
ENV_KEY_CSP_CONFIG_DIR
);
env::var("CARGO_MANIFEST_DIR").expect("CARGO_MANIFEST_DIR not set")
env::var("CARGO_MANIFEST_DIR")
.expect("CARGO_MANIFEST_DIR not set")
.into()
}
}
};
let mut csp_conf_path = PathBuf::new();
csp_conf_path.push(csp_conf_dir);
let out_path = env::var("OUT_DIR").unwrap();
csp_conf_path.push("autoconfig.rs");
if !csp_conf_path.exists() {
panic!(