Skip to content

Commit fb79ff5

Browse files
authored
Merge pull request #7 from lewismosciski/fix-helper-script-paths
Fix helper script paths and installation instructions
2 parents 57e375f + e033def commit fb79ff5

3 files changed

Lines changed: 20 additions & 18 deletions

File tree

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,8 @@ Diagnostics should be interpreted conservatively.
7878
## Installation
7979

8080
```sh
81-
$ git clone https://github.com/Rust-API/Rust-API-Bypass.git
82-
$ cd rust-api-bypass
81+
$ git clone https://github.com/Rust-API/Rust-API-Bypass-Checker.git
82+
$ cd Rust-API-Bypass-Checker
8383
$ export RUSTFLAGS="-Clink-args=-fuse-ld=lld"
8484
$ cargo build
8585
```

clean_and_run_checker.sh

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
2+
set -euo pipefail
23

3-
4-
cd "$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd -P)"
4+
repo_root="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd -P)"
5+
cd "$repo_root"
56

67
cargo clean
7-
88
cargo build
99

10-
11-
./target/debug/mir-checker ./tests/get/src/main.rs --entry main --domain interval --widening_delay 5 --narrowing_iteration 5
10+
./target/debug/api-bypass ./tests/get/src/main.rs --entry main --domain interval --widening_delay 5 --narrowing_iteration 5

target_crate_build.sh

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,23 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22

3-
# This file is to build the target crate for mir_wrapper to debug.
3+
# This file builds a target crate with mir_wrapper for debugging.
44

55
set -euo pipefail
66

7+
repo_root="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd -P)"
8+
79
usage() {
810
cat <<'EOF'
911
Usage:
10-
cdto.sh [DIRECTORY]
12+
target_crate_build.sh [DIRECTORY]
1113
1214
Description:
13-
Change into DIRECTORY. If DIRECTORY is omitted, change into $HOME.
15+
Build DIRECTORY with this repository's mir_wrapper. If DIRECTORY is omitted,
16+
build $HOME.
1417
1518
Examples:
16-
source ./cdto.sh /var/log
17-
. ./cdto.sh ~/workspace
19+
./target_crate_build.sh /path/to/crate
20+
MIR_WRAPPER_DUMP=/tmp/inv.json ./target_crate_build.sh ~/workspace
1821
EOF
1922
}
2023

@@ -49,10 +52,10 @@ pwd
4952
# build the target crate
5053
rustup override set nightly-2025-01-10
5154
rm -rf target
52-
export RUSTC_WRAPPER="/home/yunlong/workspace/Bypassing/Rust-API-Bypass/target/debug/mir_wrapper"
53-
export MIR_WRAPPER_DUMP="/var/tmp/inv.json"
54-
export MIR_CHECKER_ARGS='["--show_all_entries"]'
55+
export RUSTC_WRAPPER="${RUSTC_WRAPPER:-$repo_root/target/debug/mir_wrapper}"
56+
export MIR_WRAPPER_DUMP="${MIR_WRAPPER_DUMP:-/var/tmp/inv.json}"
57+
export MIR_CHECKER_ARGS="${MIR_CHECKER_ARGS:-[\"--show_all_entries\"]}"
5558

5659
# env | grep RUSTC
5760

58-
cargo +nightly-2025-01-10 build -vv
61+
cargo +nightly-2025-01-10 build -vv

0 commit comments

Comments
 (0)