changeset 1: |
e4f8df713d55 |
parent: |
eb8ed24e8a76
|
child: |
315fedf35bc7 |
author: |
ellis <ellis@rwest.io> |
date: |
Sun, 30 Apr 2023 22:24:18 -0400 |
permissions: |
-rw-r--r-- |
description: |
scaffolding from lives past |
2 use std::fs::create_dir; 3 use std::path::PathBuf; 5 let crate_dir: PathBuf = env::var("CARGO_MANIFEST_DIR") 6 .expect("CARGO_MANIFEST_DIR env var is not defined") 8 // let mpk_py = "build.py"; 9 let config = cbindgen::Config::from_file("cbindgen.toml") 10 .expect("Unable to find cbindgen.toml configuration file"); 11 let build_dir = crate_dir.join("ffi/"); 12 if !build_dir.exists() { 13 create_dir(&build_dir).unwrap(); 15 cbindgen::generate_with_config(&crate_dir, config) 17 .write_to_file(build_dir.join("mpk_ffi.h"));