From a2b1cd5b08c2c8e7d5f09df588be52d69a1287c8 Mon Sep 17 00:00:00 2001 From: Dominik Maier Date: Fri, 23 May 2025 15:40:40 +0200 Subject: [PATCH 01/13] Rename crates in order to make LibNyx publishable --- .gitignore | 2 ++ Cargo.toml | 18 ++++++++++++++++++ acat/Cargo.toml | 2 +- acat/src/main.rs | 2 +- libnyx/Cargo.toml | 4 ++-- libnyx/src/ffi.rs | 2 +- libnyx/src/lib.rs | 10 +++++----- {config => libnyx_config}/.gitignore | 0 {config => libnyx_config}/Cargo.toml | 2 +- {config => libnyx_config}/src/config.rs | 0 {config => libnyx_config}/src/lib.rs | 0 {config => libnyx_config}/src/loader.rs | 0 {fuzz_runner => libnyx_fuzz_runner}/.gitignore | 0 {fuzz_runner => libnyx_fuzz_runner}/Cargo.toml | 4 ++-- .../src/exitreason.rs | 0 {fuzz_runner => libnyx_fuzz_runner}/src/lib.rs | 2 +- .../src/nyx/aux_buffer.rs | 0 .../src/nyx/ijon_data.rs | 0 .../src/nyx/mem_barrier.rs | 0 .../src/nyx/mod.rs | 4 ++-- .../src/nyx/params.rs | 2 +- .../src/nyx/qemu_process.rs | 0 .../src/nyx/tests/tests.rs | 0 23 files changed, 37 insertions(+), 17 deletions(-) create mode 100644 .gitignore create mode 100644 Cargo.toml rename {config => libnyx_config}/.gitignore (100%) rename {config => libnyx_config}/Cargo.toml (92%) rename {config => libnyx_config}/src/config.rs (100%) rename {config => libnyx_config}/src/lib.rs (100%) rename {config => libnyx_config}/src/loader.rs (100%) rename {fuzz_runner => libnyx_fuzz_runner}/.gitignore (100%) rename {fuzz_runner => libnyx_fuzz_runner}/Cargo.toml (87%) rename {fuzz_runner => libnyx_fuzz_runner}/src/exitreason.rs (100%) rename {fuzz_runner => libnyx_fuzz_runner}/src/lib.rs (90%) rename {fuzz_runner => libnyx_fuzz_runner}/src/nyx/aux_buffer.rs (100%) rename {fuzz_runner => libnyx_fuzz_runner}/src/nyx/ijon_data.rs (100%) rename {fuzz_runner => libnyx_fuzz_runner}/src/nyx/mem_barrier.rs (100%) rename {fuzz_runner => libnyx_fuzz_runner}/src/nyx/mod.rs (81%) rename {fuzz_runner => libnyx_fuzz_runner}/src/nyx/params.rs (98%) rename {fuzz_runner => libnyx_fuzz_runner}/src/nyx/qemu_process.rs (100%) rename {fuzz_runner => libnyx_fuzz_runner}/src/nyx/tests/tests.rs (100%) diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..f2f9e58 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +target +Cargo.lock \ No newline at end of file diff --git a/Cargo.toml b/Cargo.toml new file mode 100644 index 0000000..4abf59b --- /dev/null +++ b/Cargo.toml @@ -0,0 +1,18 @@ +[workspace] +resolver = "2" +members = [ + "libnyx", + "libnyx_config", + "libnyx_fuzz_runner", + "acat", +] +default_members = [ + "libnyx", + "libnyx_config", + "libnyx_fuzz_runner", + "acat", +] + +[workspace.package] +version = "0.1.0" +license = "GPLv2" diff --git a/acat/Cargo.toml b/acat/Cargo.toml index dd3239a..8b41521 100644 --- a/acat/Cargo.toml +++ b/acat/Cargo.toml @@ -7,6 +7,6 @@ edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -fuzz_runner={path="../fuzz_runner"} +libnyx_fuzz_runner={path="../libnyx_fuzz_runner"} colored = "2.0.0" clap="2.33.0" diff --git a/acat/src/main.rs b/acat/src/main.rs index 2b14fe6..e3f2b9e 100644 --- a/acat/src/main.rs +++ b/acat/src/main.rs @@ -1,4 +1,4 @@ -use fuzz_runner::nyx::aux_buffer::{self, AUX_BUFFER_SIZE}; +use libnyx_fuzz_runner::nyx::aux_buffer::{self, AUX_BUFFER_SIZE}; use clap::{App, Arg, AppSettings}; diff --git a/libnyx/Cargo.toml b/libnyx/Cargo.toml index df45885..f46a215 100644 --- a/libnyx/Cargo.toml +++ b/libnyx/Cargo.toml @@ -11,6 +11,6 @@ crate-type = ["lib", "staticlib", "dylib"] cbindgen = "0.28.0" [dependencies] -config={path="../config"} -fuzz_runner={path="../fuzz_runner"} +libnyx_config={path="../libnyx_config"} +libnyx_fuzz_runner={path="../libnyx_fuzz_runner"} libc = "0.2" diff --git a/libnyx/src/ffi.rs b/libnyx/src/ffi.rs index 976894f..7b6cac7 100644 --- a/libnyx/src/ffi.rs +++ b/libnyx/src/ffi.rs @@ -19,7 +19,7 @@ use libc::c_char; use std::ffi::CStr; use std::ffi::c_void; -use fuzz_runner::nyx::aux_buffer::{NYX_CRASH, NYX_HPRINTF, NYX_ABORT}; +use libnyx_fuzz_runner::nyx::aux_buffer::{NYX_CRASH, NYX_HPRINTF, NYX_ABORT}; use super::*; /* Helper function to load a C string pointer and return a Rust string. */ diff --git a/libnyx/src/lib.rs b/libnyx/src/lib.rs index d6560b3..a53c672 100644 --- a/libnyx/src/lib.rs +++ b/libnyx/src/lib.rs @@ -17,10 +17,10 @@ */ extern crate libc; -use config::{Config, FuzzRunnerConfig, QemuNyxRole}; +use libnyx_config::{Config, FuzzRunnerConfig, QemuNyxRole}; -use fuzz_runner::nyx::qemu_process::QemuProcess; -use fuzz_runner::nyx::aux_buffer::{NYX_SUCCESS, NYX_CRASH, NYX_TIMEOUT, NYX_INPUT_WRITE, NYX_ABORT}; +use libnyx_fuzz_runner::nyx::qemu_process::QemuProcess; +use libnyx_fuzz_runner::nyx::aux_buffer::{NYX_SUCCESS, NYX_CRASH, NYX_TIMEOUT, NYX_INPUT_WRITE, NYX_ABORT}; use libc::fcntl; use std::fmt; @@ -258,7 +258,7 @@ impl NyxProcess { let sharedir = config.sharedir_path(); config.set_worker_id(worker_id); - match fuzz_runner::nyx::qemu_process_new(sharedir.to_string(), &config.config){ + match libnyx_fuzz_runner::nyx::qemu_process_new(sharedir.to_string(), &config.config){ Ok(x) => Ok(NyxProcess{ process: x, }), @@ -389,5 +389,5 @@ impl NyxProcess { } pub fn remove_work_dir(workdir: &str) -> Result<(), String> { - fuzz_runner::nyx::qemu_process::remove_workdir_safe(workdir) + libnyx_fuzz_runner::nyx::qemu_process::remove_workdir_safe(workdir) } diff --git a/config/.gitignore b/libnyx_config/.gitignore similarity index 100% rename from config/.gitignore rename to libnyx_config/.gitignore diff --git a/config/Cargo.toml b/libnyx_config/Cargo.toml similarity index 92% rename from config/Cargo.toml rename to libnyx_config/Cargo.toml index 0f842c0..7a5db08 100644 --- a/config/Cargo.toml +++ b/libnyx_config/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "config" +name = "libnyx_config" version = "0.1.0" authors = ["coco "] edition = "2021" diff --git a/config/src/config.rs b/libnyx_config/src/config.rs similarity index 100% rename from config/src/config.rs rename to libnyx_config/src/config.rs diff --git a/config/src/lib.rs b/libnyx_config/src/lib.rs similarity index 100% rename from config/src/lib.rs rename to libnyx_config/src/lib.rs diff --git a/config/src/loader.rs b/libnyx_config/src/loader.rs similarity index 100% rename from config/src/loader.rs rename to libnyx_config/src/loader.rs diff --git a/fuzz_runner/.gitignore b/libnyx_fuzz_runner/.gitignore similarity index 100% rename from fuzz_runner/.gitignore rename to libnyx_fuzz_runner/.gitignore diff --git a/fuzz_runner/Cargo.toml b/libnyx_fuzz_runner/Cargo.toml similarity index 87% rename from fuzz_runner/Cargo.toml rename to libnyx_fuzz_runner/Cargo.toml index c70d0e8..c0592c7 100644 --- a/fuzz_runner/Cargo.toml +++ b/libnyx_fuzz_runner/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "fuzz_runner" +name = "libnyx_fuzz_runner" version = "0.1.0" authors = ["coco "] edition = "2021" @@ -19,7 +19,7 @@ byteorder = "*" snafu = "0.6.3" timeout-readwrite = "0.3.1" glob="0.3.0" -config={path="../config"} +libnyx_config={path="../libnyx_config"} colored = "2.0.0" derivative = "2.1.1" fs4 = "0.5.4" diff --git a/fuzz_runner/src/exitreason.rs b/libnyx_fuzz_runner/src/exitreason.rs similarity index 100% rename from fuzz_runner/src/exitreason.rs rename to libnyx_fuzz_runner/src/exitreason.rs diff --git a/fuzz_runner/src/lib.rs b/libnyx_fuzz_runner/src/lib.rs similarity index 90% rename from fuzz_runner/src/lib.rs rename to libnyx_fuzz_runner/src/lib.rs index d2d6d37..911a583 100644 --- a/fuzz_runner/src/lib.rs +++ b/libnyx_fuzz_runner/src/lib.rs @@ -4,7 +4,7 @@ extern crate nix; extern crate serde_derive; extern crate snafu; extern crate timeout_readwrite; -extern crate config; +extern crate libnyx_config; pub mod exitreason; diff --git a/fuzz_runner/src/nyx/aux_buffer.rs b/libnyx_fuzz_runner/src/nyx/aux_buffer.rs similarity index 100% rename from fuzz_runner/src/nyx/aux_buffer.rs rename to libnyx_fuzz_runner/src/nyx/aux_buffer.rs diff --git a/fuzz_runner/src/nyx/ijon_data.rs b/libnyx_fuzz_runner/src/nyx/ijon_data.rs similarity index 100% rename from fuzz_runner/src/nyx/ijon_data.rs rename to libnyx_fuzz_runner/src/nyx/ijon_data.rs diff --git a/fuzz_runner/src/nyx/mem_barrier.rs b/libnyx_fuzz_runner/src/nyx/mem_barrier.rs similarity index 100% rename from fuzz_runner/src/nyx/mem_barrier.rs rename to libnyx_fuzz_runner/src/nyx/mem_barrier.rs diff --git a/fuzz_runner/src/nyx/mod.rs b/libnyx_fuzz_runner/src/nyx/mod.rs similarity index 81% rename from fuzz_runner/src/nyx/mod.rs rename to libnyx_fuzz_runner/src/nyx/mod.rs index 5184d7b..a85c57d 100644 --- a/fuzz_runner/src/nyx/mod.rs +++ b/libnyx_fuzz_runner/src/nyx/mod.rs @@ -9,7 +9,7 @@ pub use qemu_process::QemuProcess; use std::fs; use std::path::PathBuf; -extern crate config; +extern crate libnyx_config; fn into_absolute_path(sharedir: &str) -> String{ @@ -23,7 +23,7 @@ fn into_absolute_path(sharedir: &str) -> String{ } } -pub fn qemu_process_new(sharedir: String, cfg: &config::Config) -> Result { +pub fn qemu_process_new(sharedir: String, cfg: &libnyx_config::Config) -> Result { let qemu_params = params::QemuParams::new(into_absolute_path(&sharedir), cfg); diff --git a/fuzz_runner/src/nyx/params.rs b/libnyx_fuzz_runner/src/nyx/params.rs similarity index 98% rename from fuzz_runner/src/nyx/params.rs rename to libnyx_fuzz_runner/src/nyx/params.rs index f837513..5686b47 100644 --- a/fuzz_runner/src/nyx/params.rs +++ b/libnyx_fuzz_runner/src/nyx/params.rs @@ -1,5 +1,5 @@ use std::time::Duration; -use crate::{config::{Config, FuzzRunnerConfig, QemuNyxRole}, QemuProcess}; +use crate::{libnyx_config::{Config, FuzzRunnerConfig, QemuNyxRole}, QemuProcess}; pub struct QemuParams { pub cmd: Vec, diff --git a/fuzz_runner/src/nyx/qemu_process.rs b/libnyx_fuzz_runner/src/nyx/qemu_process.rs similarity index 100% rename from fuzz_runner/src/nyx/qemu_process.rs rename to libnyx_fuzz_runner/src/nyx/qemu_process.rs diff --git a/fuzz_runner/src/nyx/tests/tests.rs b/libnyx_fuzz_runner/src/nyx/tests/tests.rs similarity index 100% rename from fuzz_runner/src/nyx/tests/tests.rs rename to libnyx_fuzz_runner/src/nyx/tests/tests.rs From 6ffa91f98cfd857336263cfe5501065c6955a2a4 Mon Sep 17 00:00:00 2001 From: mio Date: Fri, 23 May 2025 22:49:24 +0800 Subject: [PATCH 02/13] metadata --- Cargo.toml | 7 ++++++- acat/Cargo.toml | 9 +++++++-- libnyx/Cargo.toml | 13 +++++++++---- libnyx_config/Cargo.toml | 9 +++++++-- libnyx_fuzz_runner/Cargo.toml | 12 +++++++++--- 5 files changed, 38 insertions(+), 12 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 4abf59b..c023b7d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -15,4 +15,9 @@ default_members = [ [workspace.package] version = "0.1.0" -license = "GPLv2" +license = "GPL-2.0-only" +edition = "2021" +description = "libnyx fork only for publishing" +homepage = "https://github.com/wtdcode/libnyx" +repository = "https://github.com/wtdcode/libnyx" +readme = "README.md" \ No newline at end of file diff --git a/acat/Cargo.toml b/acat/Cargo.toml index 8b41521..67cac5e 100644 --- a/acat/Cargo.toml +++ b/acat/Cargo.toml @@ -1,8 +1,13 @@ [package] name = "acat" -version = "0.1.0" authors = ["Sergej Schumilo "] -edition = "2021" +version.workspace = true +edition.workspace = true +license.workspace = true +description.workspace = true +readme.workspace = true +homepage.workspace = true +repository.workspace = true # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/libnyx/Cargo.toml b/libnyx/Cargo.toml index f46a215..232b795 100644 --- a/libnyx/Cargo.toml +++ b/libnyx/Cargo.toml @@ -1,7 +1,12 @@ [package] name = "libnyx" -version = "0.1.0" -edition = "2021" +version.workspace = true +edition.workspace = true +license.workspace = true +description.workspace = true +readme.workspace = true +homepage.workspace = true +repository.workspace = true [lib] name = "libnyx" @@ -11,6 +16,6 @@ crate-type = ["lib", "staticlib", "dylib"] cbindgen = "0.28.0" [dependencies] -libnyx_config={path="../libnyx_config"} -libnyx_fuzz_runner={path="../libnyx_fuzz_runner"} +libnyx_config={version = "0.1.0", path="../libnyx_config"} +libnyx_fuzz_runner={version = "0.1.0", path="../libnyx_fuzz_runner"} libc = "0.2" diff --git a/libnyx_config/Cargo.toml b/libnyx_config/Cargo.toml index 7a5db08..df18bbf 100644 --- a/libnyx_config/Cargo.toml +++ b/libnyx_config/Cargo.toml @@ -1,8 +1,13 @@ [package] name = "libnyx_config" -version = "0.1.0" authors = ["coco "] -edition = "2021" +version.workspace = true +edition.workspace = true +license.workspace = true +description.workspace = true +readme.workspace = true +homepage.workspace = true +repository.workspace = true # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/libnyx_fuzz_runner/Cargo.toml b/libnyx_fuzz_runner/Cargo.toml index c0592c7..e6ddc41 100644 --- a/libnyx_fuzz_runner/Cargo.toml +++ b/libnyx_fuzz_runner/Cargo.toml @@ -1,8 +1,14 @@ [package] name = "libnyx_fuzz_runner" -version = "0.1.0" +version.workspace = true +edition.workspace = true +license.workspace = true +description.workspace = true +readme.workspace = true +homepage.workspace = true +repository.workspace = true + authors = ["coco "] -edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html @@ -19,7 +25,7 @@ byteorder = "*" snafu = "0.6.3" timeout-readwrite = "0.3.1" glob="0.3.0" -libnyx_config={path="../libnyx_config"} +libnyx_config={version = "0.1.0", path="../libnyx_config"} colored = "2.0.0" derivative = "2.1.1" fs4 = "0.5.4" From 7dd5e4fac27d3f31162c028970635cef6c7c42ca Mon Sep 17 00:00:00 2001 From: mio Date: Fri, 23 May 2025 22:52:17 +0800 Subject: [PATCH 03/13] members --- Cargo.toml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index c023b7d..b9abfe7 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -20,4 +20,9 @@ edition = "2021" description = "libnyx fork only for publishing" homepage = "https://github.com/wtdcode/libnyx" repository = "https://github.com/wtdcode/libnyx" -readme = "README.md" \ No newline at end of file +readme = "README.md" + +[workspace.dependencies] +libnyx_fuzz_runner = {version = "0.1.0", path = "libnyx_fuzz_runner"} +libnyx = {version = "0.1.0", path = "libnyx"} +libnyx_config = {version = "0.1.0", path = "libnyx_config"} \ No newline at end of file From 4b73f034e062e1c13888d0349ca8f3689180f697 Mon Sep 17 00:00:00 2001 From: mio Date: Fri, 23 May 2025 22:53:07 +0800 Subject: [PATCH 04/13] fix dep --- acat/Cargo.toml | 2 +- libnyx/Cargo.toml | 4 ++-- libnyx_fuzz_runner/Cargo.toml | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/acat/Cargo.toml b/acat/Cargo.toml index 67cac5e..dd86cb7 100644 --- a/acat/Cargo.toml +++ b/acat/Cargo.toml @@ -12,6 +12,6 @@ repository.workspace = true # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -libnyx_fuzz_runner={path="../libnyx_fuzz_runner"} +libnyx_fuzz_runner.workspace = true colored = "2.0.0" clap="2.33.0" diff --git a/libnyx/Cargo.toml b/libnyx/Cargo.toml index 232b795..9e537f4 100644 --- a/libnyx/Cargo.toml +++ b/libnyx/Cargo.toml @@ -16,6 +16,6 @@ crate-type = ["lib", "staticlib", "dylib"] cbindgen = "0.28.0" [dependencies] -libnyx_config={version = "0.1.0", path="../libnyx_config"} -libnyx_fuzz_runner={version = "0.1.0", path="../libnyx_fuzz_runner"} +libnyx_config.workspace = true +libnyx_fuzz_runner.workspace = true libc = "0.2" diff --git a/libnyx_fuzz_runner/Cargo.toml b/libnyx_fuzz_runner/Cargo.toml index e6ddc41..5a75abc 100644 --- a/libnyx_fuzz_runner/Cargo.toml +++ b/libnyx_fuzz_runner/Cargo.toml @@ -25,7 +25,7 @@ byteorder = "*" snafu = "0.6.3" timeout-readwrite = "0.3.1" glob="0.3.0" -libnyx_config={version = "0.1.0", path="../libnyx_config"} +libnyx_config.workspace = true colored = "2.0.0" derivative = "2.1.1" fs4 = "0.5.4" From dfb6f2aa56bc67d7f0d188a1b0cbba80ecb8b2b9 Mon Sep 17 00:00:00 2001 From: mio Date: Fri, 23 May 2025 23:06:48 +0800 Subject: [PATCH 05/13] update readme --- README.md | 21 +++++---------------- 1 file changed, 5 insertions(+), 16 deletions(-) diff --git a/README.md b/README.md index 446aead..64e8ce6 100644 --- a/README.md +++ b/README.md @@ -1,21 +1,10 @@ # libnyx -

- -

+This is a friendly release of [libnyx](https://github.com/nyx-fuzz/libnyx). It is open to transfer to libnyx teams members. -libnyx is a library that allows you to simply build hypervisor-based snapshot fuzzers. Using libnyx, managing multiple VMs and snapshots as well as the communication with the code running in the VM becomes a matter of a handful of lines of code. At the moment, libnyx can be used via a simple C interface or from a rust library. +Please contact me either via [email](mio@lazym.io) or [Discord](https://discord.gg/gCraWct). In case I'm not reachable in one week, I consent to the transfer of this crate to the [libnyx team](https://github.com/nyx-fuzz), specifically the two authors: -## Bug Reports and Contributions +- [Sergej Schumilo](http://schumilo.de) - sergej@schumilo.de / [@ms_s3c](https://twitter.com/ms_s3c) +- [Cornelius Aschermann](https://hexgolems.com) - cornelius@hexgolems.com / [@is_eqv](https://twitter.com/is_eqv) -If you found and fixed a bug on your own: We are very open to patches, please create a pull request! - -### License - -This library is provided under **GPLv2 license**. - -**Free Software Hell Yeah!** - -Proudly provided by: -* [Sergej Schumilo](http://schumilo.de) - sergej@schumilo.de / [@ms_s3c](https://twitter.com/ms_s3c) -* [Cornelius Aschermann](https://hexgolems.com) - cornelius@hexgolems.com / [@is_eqv](https://twitter.com/is_eqv) +by asking help@crates.io. \ No newline at end of file From 14b0dd1e0dbf93f2fc9774228ac255b4b3fe53a2 Mon Sep 17 00:00:00 2001 From: mio Date: Fri, 23 May 2025 23:08:15 +0800 Subject: [PATCH 06/13] update policy --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 64e8ce6..f720b66 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,8 @@ # libnyx -This is a friendly release of [libnyx](https://github.com/nyx-fuzz/libnyx). It is open to transfer to libnyx teams members. +This is a friendly release of [libnyx](https://github.com/nyx-fuzz/libnyx). It is open to transfer with the policy below: -Please contact me either via [email](mio@lazym.io) or [Discord](https://discord.gg/gCraWct). In case I'm not reachable in one week, I consent to the transfer of this crate to the [libnyx team](https://github.com/nyx-fuzz), specifically the two authors: +Please contact me either via [email](mio@lazym.io) or wtdcode in [Discord](https://discord.gg/gCraWct). In case I'm not reachable in one week, I consent to the transfer of this crate to the [libnyx team](https://github.com/nyx-fuzz), specifically the two authors: - [Sergej Schumilo](http://schumilo.de) - sergej@schumilo.de / [@ms_s3c](https://twitter.com/ms_s3c) - [Cornelius Aschermann](https://hexgolems.com) - cornelius@hexgolems.com / [@is_eqv](https://twitter.com/is_eqv) From db574b6c6929e0d7cd0a0a1130def35c0f676e76 Mon Sep 17 00:00:00 2001 From: mio Date: Fri, 23 May 2025 23:08:47 +0800 Subject: [PATCH 07/13] update repo url --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index b9abfe7..145b8db 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -19,7 +19,7 @@ license = "GPL-2.0-only" edition = "2021" description = "libnyx fork only for publishing" homepage = "https://github.com/wtdcode/libnyx" -repository = "https://github.com/wtdcode/libnyx" +repository = "https://github.com/nyx-fuzz/libnyx" readme = "README.md" [workspace.dependencies] From 17dcdf7b9e0aa5b5e53c2983a38e529a1abf64d2 Mon Sep 17 00:00:00 2001 From: mio Date: Fri, 23 May 2025 23:11:15 +0800 Subject: [PATCH 08/13] fix byteorder --- libnyx_fuzz_runner/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libnyx_fuzz_runner/Cargo.toml b/libnyx_fuzz_runner/Cargo.toml index 5a75abc..efe0f7e 100644 --- a/libnyx_fuzz_runner/Cargo.toml +++ b/libnyx_fuzz_runner/Cargo.toml @@ -21,7 +21,7 @@ quick-error = "*" rand = "0.7.3" serde_derive = "1.0" serde = "1.0" -byteorder = "*" +byteorder = "0" snafu = "0.6.3" timeout-readwrite = "0.3.1" glob="0.3.0" From 5afffce9896b8e59c3701f45400dcccb0b2e7a07 Mon Sep 17 00:00:00 2001 From: mio Date: Fri, 23 May 2025 23:14:28 +0800 Subject: [PATCH 09/13] bump --- Cargo.toml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 145b8db..f5daf67 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -14,7 +14,7 @@ default_members = [ ] [workspace.package] -version = "0.1.0" +version = "0.1.1" license = "GPL-2.0-only" edition = "2021" description = "libnyx fork only for publishing" @@ -23,6 +23,6 @@ repository = "https://github.com/nyx-fuzz/libnyx" readme = "README.md" [workspace.dependencies] -libnyx_fuzz_runner = {version = "0.1.0", path = "libnyx_fuzz_runner"} -libnyx = {version = "0.1.0", path = "libnyx"} -libnyx_config = {version = "0.1.0", path = "libnyx_config"} \ No newline at end of file +libnyx_fuzz_runner = {version = "0.1.1", path = "libnyx_fuzz_runner"} +libnyx = {version = "0.1.1", path = "libnyx"} +libnyx_config = {version = "0.1.1", path = "libnyx_config"} \ No newline at end of file From a68f1ce7fe37fed601983b437a23ebfb4a6790e1 Mon Sep 17 00:00:00 2001 From: mio Date: Fri, 23 May 2025 23:15:56 +0800 Subject: [PATCH 10/13] libnyx_acat --- Cargo.toml | 4 ++-- {acat => libnyx_acat}/.gitignore | 0 {acat => libnyx_acat}/Cargo.toml | 2 +- {acat => libnyx_acat}/src/main.rs | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) rename {acat => libnyx_acat}/.gitignore (100%) rename {acat => libnyx_acat}/Cargo.toml (95%) rename {acat => libnyx_acat}/src/main.rs (99%) diff --git a/Cargo.toml b/Cargo.toml index f5daf67..fdbad5e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -4,13 +4,13 @@ members = [ "libnyx", "libnyx_config", "libnyx_fuzz_runner", - "acat", + "libnyx_acat", ] default_members = [ "libnyx", "libnyx_config", "libnyx_fuzz_runner", - "acat", + "libnyx_acat", ] [workspace.package] diff --git a/acat/.gitignore b/libnyx_acat/.gitignore similarity index 100% rename from acat/.gitignore rename to libnyx_acat/.gitignore diff --git a/acat/Cargo.toml b/libnyx_acat/Cargo.toml similarity index 95% rename from acat/Cargo.toml rename to libnyx_acat/Cargo.toml index dd86cb7..b2e23f1 100644 --- a/acat/Cargo.toml +++ b/libnyx_acat/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "acat" +name = "libnyx_acat" authors = ["Sergej Schumilo "] version.workspace = true edition.workspace = true diff --git a/acat/src/main.rs b/libnyx_acat/src/main.rs similarity index 99% rename from acat/src/main.rs rename to libnyx_acat/src/main.rs index e3f2b9e..0fc9375 100644 --- a/acat/src/main.rs +++ b/libnyx_acat/src/main.rs @@ -48,7 +48,7 @@ fn print_aux_buffer(aux_buffer: &aux_buffer::AuxBuffer, target_file: &String, sh fn main() { - let matches = App::new("acat") + let matches = App::new("libnyx_acat") .about("Fancy tool to debug aux buffers!") .arg( Arg::with_name("target_file") From 0ac37bf3b99901aded616f72bfd24d391cb91999 Mon Sep 17 00:00:00 2001 From: mio Date: Fri, 23 May 2025 23:16:52 +0800 Subject: [PATCH 11/13] fix release issue again --- Cargo.toml | 8 ++++---- libnyx_fuzz_runner/Cargo.toml | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index fdbad5e..c933d47 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -14,7 +14,7 @@ default_members = [ ] [workspace.package] -version = "0.1.1" +version = "0.1.2" license = "GPL-2.0-only" edition = "2021" description = "libnyx fork only for publishing" @@ -23,6 +23,6 @@ repository = "https://github.com/nyx-fuzz/libnyx" readme = "README.md" [workspace.dependencies] -libnyx_fuzz_runner = {version = "0.1.1", path = "libnyx_fuzz_runner"} -libnyx = {version = "0.1.1", path = "libnyx"} -libnyx_config = {version = "0.1.1", path = "libnyx_config"} \ No newline at end of file +libnyx_fuzz_runner = {version = "0.1.2", path = "libnyx_fuzz_runner"} +libnyx = {version = "0.1.2", path = "libnyx"} +libnyx_config = {version = "0.1.2", path = "libnyx_config"} \ No newline at end of file diff --git a/libnyx_fuzz_runner/Cargo.toml b/libnyx_fuzz_runner/Cargo.toml index efe0f7e..4fe798a 100644 --- a/libnyx_fuzz_runner/Cargo.toml +++ b/libnyx_fuzz_runner/Cargo.toml @@ -17,7 +17,7 @@ nix = "0.26.2" time = "0.2.9" subprocess = "0.2.4" libc = "0.2.68" -quick-error = "*" +quick-error = "0" rand = "0.7.3" serde_derive = "1.0" serde = "1.0" From 39cad5491c8d215bd3847b33ed36458ec070b80c Mon Sep 17 00:00:00 2001 From: mio Date: Fri, 23 May 2025 23:20:30 +0800 Subject: [PATCH 12/13] build to OUT_DIR --- libnyx/build.rs | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/libnyx/build.rs b/libnyx/build.rs index 173cb88..cd33403 100644 --- a/libnyx/build.rs +++ b/libnyx/build.rs @@ -4,14 +4,11 @@ use std::path::PathBuf; fn main() { - println!("build.rs"); let crate_dir = PathBuf::from(env::var("CARGO_MANIFEST_DIR") .expect("CARGO_MANIFEST_DIR env var is not defined")); - println!("CARGO_MANIFEST_DIR: {:?}", crate_dir); let out_dir = PathBuf::from(env::var("OUT_DIR") .expect("OUT_DIR env var is not defined")); - println!("OUT_DIR: {:?}", out_dir); let config = cbindgen::Config::from_file("cbindgen.toml") .expect("Unable to find cbindgen.toml configuration file"); @@ -20,10 +17,8 @@ fn main() { // cargo +nightly build --out-dir `pwd` -Z unstable-options // added question to this issue: https://github.com/rust-lang/cargo/issues/6790 // for now, CARGO_MANIFEST_DIR (crate_dir) seems reasonable - - cbindgen::generate_with_config(&crate_dir, config) .unwrap() - .write_to_file(crate_dir.join("libnyx.h")); + .write_to_file(out_dir.join("libnyx.h")); } From 14c8550b87a417ff70dbd7ce76c6e11ef88c2ea5 Mon Sep 17 00:00:00 2001 From: mio Date: Fri, 23 May 2025 23:20:47 +0800 Subject: [PATCH 13/13] bump again --- Cargo.toml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index c933d47..38c4a40 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -14,7 +14,7 @@ default_members = [ ] [workspace.package] -version = "0.1.2" +version = "0.1.3" license = "GPL-2.0-only" edition = "2021" description = "libnyx fork only for publishing" @@ -23,6 +23,6 @@ repository = "https://github.com/nyx-fuzz/libnyx" readme = "README.md" [workspace.dependencies] -libnyx_fuzz_runner = {version = "0.1.2", path = "libnyx_fuzz_runner"} -libnyx = {version = "0.1.2", path = "libnyx"} -libnyx_config = {version = "0.1.2", path = "libnyx_config"} \ No newline at end of file +libnyx_fuzz_runner = {version = "0.1.3", path = "libnyx_fuzz_runner"} +libnyx = {version = "0.1.3", path = "libnyx"} +libnyx_config = {version = "0.1.3", path = "libnyx_config"} \ No newline at end of file