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
10 changes: 9 additions & 1 deletion .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,13 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: taiki-e/install-action@v2
env:
CARGO_TERM_COLOR: always
with:
tool: nextest
- name: test
run: cargo test
uses: actions-rs/cargo@v1
with:
command: nextest
args: run --test-threads 1 --retries 10
7 changes: 7 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ edition = "2024"

[dependencies]
nix = { version = "0.31.1", features = ["ptrace"] }
scopeguard = "1.2.0"
thiserror = "2.0.18"

[dev-dependencies]
Expand Down
28 changes: 27 additions & 1 deletion dummy_process/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ static I8VAL: atomic::AtomicI8 = atomic::AtomicI8::new(-1);
static I16VAL: atomic::AtomicI16 = atomic::AtomicI16::new(-2);
static I32VAL: atomic::AtomicI32 = atomic::AtomicI32::new(-3);
static I64VAL: atomic::AtomicI64 = atomic::AtomicI64::new(-4);
static F32VAL: f32 = 1.5;
static F64VAL: f64 = 2.5;

#[tokio::main]
async fn main() {
Expand Down Expand Up @@ -135,6 +137,26 @@ async fn main() {
"OK"
});

let f32val_endpoint = warp::path!("f32val").map(|| format!("{}", F32VAL));
let f32val_address_endpoint = warp::path!("f32val" / "address").map(|| {
let hex_val = format!("{:?}", ptr::addr_of!(F32VAL));
let cleaned = hex_val.trim_start_matches("0x");
format!(
"{}",
usize::from_str_radix(cleaned, 16).expect("Failed to parse address hex value.")
)
});

let f64val_endpoint = warp::path!("f64val").map(|| format!("{}", F64VAL));
let f64val_address_endpoint = warp::path!("f64val" / "address").map(|| {
let hex_val = format!("{:?}", ptr::addr_of!(F64VAL));
let cleaned = hex_val.trim_start_matches("0x");
format!(
"{}",
usize::from_str_radix(cleaned, 16).expect("Failed to parse address hex value.")
)
});

let routes = warp::get().and(
pid_endpoint
.or(u8val_endpoint)
Expand All @@ -160,7 +182,11 @@ async fn main() {
.or(i32val_increment_endpoint)
.or(i64val_endpoint)
.or(i64val_address_endpoint)
.or(i64val_increment_endpoint),
.or(i64val_increment_endpoint)
.or(f32val_endpoint)
.or(f32val_address_endpoint)
.or(f64val_endpoint)
.or(f64val_address_endpoint),
);

let port = rand::random_range(1000..u16::MAX);
Expand Down
11 changes: 11 additions & 0 deletions src/byte_order.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
// Copyright (c) 2026 Eray Erdin
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at https://mozilla.org/MPL/2.0/.

/// The byte order of the data. Default value is the native endianness of the system.
pub enum ByteOrder {
BigEndian,
LittleEndian,
}
1 change: 1 addition & 0 deletions src/ext/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@
// file, You can obtain one at https://mozilla.org/MPL/2.0/.

mod mapping;
pub mod read;
pub mod search;
Loading