Skip to content

Commit

Permalink
move bindings.rs into target (Trust-Machines#19)
Browse files Browse the repository at this point in the history
* move bindings.rs into target

* fmt fixes
  • Loading branch information
xoloki authored Feb 9, 2023
1 parent aaf7848 commit cff170e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 2 additions & 1 deletion build.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
use std::collections::HashSet;
use std::env;
use std::iter::FromIterator;

use itertools::Itertools;
Expand Down Expand Up @@ -49,7 +50,7 @@ fn main() {
// Unwrap the Result and panic on failure.
.expect("Unable to generate bindings");

let bindings_file = "src/bindings.rs";
let bindings_file = &format!("{}/bindings.rs", env::var("OUT_DIR").unwrap());

// Write the bindings to the $OUT_DIR/bindings.rs file.
bindings
Expand Down
4 changes: 3 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@
#[allow(deref_nullptr)]
#[allow(improper_ctypes)]
#[allow(clippy::all)]
mod bindings;
mod bindings {
include!(concat!(env!("OUT_DIR"), "/bindings.rs"));
}

pub mod point;
pub mod scalar;

0 comments on commit cff170e

Please sign in to comment.