forked from AndersTrier/reed-solomon-simd
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.rs
More file actions
23 lines (19 loc) · 691 Bytes
/
build.rs
File metadata and controls
23 lines (19 loc) · 691 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
use std::{env, error::Error, fs, path::PathBuf};
// ======================================================================
// CONST
const CRATE_NAME: &str = "reed_solomon_simd";
// ======================================================================
// MAIN
fn main() -> Result<(), Box<dyn Error>> {
println!("cargo:rerun-if-changed=README.md");
fs::write(
PathBuf::from(env::var("OUT_DIR")?).join("README-rustdocified.md"),
readme_rustdocifier::rustdocify(
&fs::read_to_string("README.md")?,
&env::var("CARGO_PKG_NAME")?,
Some(&env::var("CARGO_PKG_VERSION")?),
Some(CRATE_NAME),
)?,
)?;
Ok(())
}