Skip to content

Commit b09409a

Browse files
authored
Merge pull request #19 from am009/main
Fix README and minor issues.
2 parents f3984ca + e33a1ba commit b09409a

File tree

3 files changed

+8
-7
lines changed

3 files changed

+8
-7
lines changed

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,9 @@ FFI to [TinyInst](https://github.com/googleprojectzero/TinyInst). Created for [L
1313
## Running the test
1414

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

1920

2021
## Optional ENV Variables

build.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ fn build_dep_check(tools: &[&str]) -> bool {
1616
return false;
1717
}
1818
}
19-
return true;
19+
true
2020
}
2121

2222
fn main() {
@@ -44,7 +44,7 @@ fn main() {
4444

4545
let custum_tinyinst_dir =
4646
env::var_os("CUSTOM_TINYINST_DIR").map(|x| x.to_string_lossy().to_string());
47-
let custum_tinyinst_no_build = env::var("CUSTOM_TINYINST_NO_BUILD").is_ok();
47+
let custom_tinyinst_no_build = env::var("CUSTOM_TINYINST_NO_BUILD").is_ok();
4848

4949
println!("cargo:rerun-if-env-changed=CUSTOM_TINYINST_DIR");
5050
println!("cargo:rerun-if-env-changed=CUSTOM_TINYINST_NO_BUILD");
@@ -106,7 +106,7 @@ fn main() {
106106
}
107107
tinyinst_path
108108
};
109-
if !custum_tinyinst_no_build {
109+
if !custom_tinyinst_no_build {
110110
println!(
111111
"cargo:warning=Generating Bridge files. and building for {}",
112112
&tinyinst_path.to_string_lossy()

src/tinyinst.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ impl TinyInst {
153153

154154
let mut tinyinst_args_ptr: Vec<*mut c_char> = tinyinst_args_cstr
155155
.iter()
156-
.map(|arg| arg.as_ptr() as *mut c_char)
156+
.map(|arg| arg.as_ptr().cast_mut())
157157
.collect();
158158
tinyinst_args_ptr.push(core::ptr::null_mut());
159159

@@ -170,7 +170,7 @@ impl TinyInst {
170170

171171
let mut program_args_ptr: Vec<*mut c_char> = program_args_cstr
172172
.iter()
173-
.map(|arg| arg.as_ptr() as *mut c_char)
173+
.map(|arg| arg.as_ptr().cast_mut())
174174
.collect();
175175
program_args_ptr.push(core::ptr::null_mut());
176176

0 commit comments

Comments
 (0)