Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,9 @@ FFI to [TinyInst](https://github.com/googleprojectzero/TinyInst). Created for [L
## Running the test

1. Open a terminal and set up your build environment (e.g. On Windows, run Developer Powershell / Developer CMD/ vcvars64.bat / vcvars32.bat)
2. Run `cargo make build_test` to build the test binary
3. Run `cargo test` to run the test
2. Run `cargo install just` to install just.
3. Run `just build_test` to build the test binary
4. Run `cargo test` to run the test


## Optional ENV Variables
Expand Down
6 changes: 3 additions & 3 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ fn build_dep_check(tools: &[&str]) -> bool {
return false;
}
}
return true;
true
}

fn main() {
Expand Down Expand Up @@ -44,7 +44,7 @@ fn main() {

let custum_tinyinst_dir =
env::var_os("CUSTOM_TINYINST_DIR").map(|x| x.to_string_lossy().to_string());
let custum_tinyinst_no_build = env::var("CUSTOM_TINYINST_NO_BUILD").is_ok();
let custom_tinyinst_no_build = env::var("CUSTOM_TINYINST_NO_BUILD").is_ok();

println!("cargo:rerun-if-env-changed=CUSTOM_TINYINST_DIR");
println!("cargo:rerun-if-env-changed=CUSTOM_TINYINST_NO_BUILD");
Expand Down Expand Up @@ -106,7 +106,7 @@ fn main() {
}
tinyinst_path
};
if !custum_tinyinst_no_build {
if !custom_tinyinst_no_build {
println!(
"cargo:warning=Generating Bridge files. and building for {}",
&tinyinst_path.to_string_lossy()
Expand Down
4 changes: 2 additions & 2 deletions src/tinyinst.rs
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ impl TinyInst {

let mut tinyinst_args_ptr: Vec<*mut c_char> = tinyinst_args_cstr
.iter()
.map(|arg| arg.as_ptr() as *mut c_char)
.map(|arg| arg.as_ptr().cast_mut())
.collect();
tinyinst_args_ptr.push(core::ptr::null_mut());

Expand All @@ -170,7 +170,7 @@ impl TinyInst {

let mut program_args_ptr: Vec<*mut c_char> = program_args_cstr
.iter()
.map(|arg| arg.as_ptr() as *mut c_char)
.map(|arg| arg.as_ptr().cast_mut())
.collect();
program_args_ptr.push(core::ptr::null_mut());

Expand Down