From aaa72c49ca11a40426fc9aa62de9e1ac0cf68657 Mon Sep 17 00:00:00 2001 From: Rog3rSm1th Date: Thu, 7 Nov 2024 15:37:13 +0100 Subject: [PATCH] Add `cairo-runtime-native` to dependencies --- cairo-native-fuzzer/Cargo.toml | 7 ++++++- cairo-native-fuzzer/README.md | 5 +---- cairo-native-fuzzer/examples/fuzzinglabs.cairo | 2 +- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/cairo-native-fuzzer/Cargo.toml b/cairo-native-fuzzer/Cargo.toml index bf54e3f..dce9317 100644 --- a/cairo-native-fuzzer/Cargo.toml +++ b/cairo-native-fuzzer/Cargo.toml @@ -7,7 +7,8 @@ edition = "2021" cairo-lang-compiler = "2.8.4" cairo-lang-sierra = "2.8.4" cairo-lang-starknet = "2.8.4" -cairo-native = "0.2.0-alpha.4" +cairo-native = { version = "0.2.0-alpha.4", features = ["with-runtime"] } +cairo-native-runtime = { version = "0.2.0-alpha.4", optional = true } clap = "4.5.20" rand = "0.8.5" starknet-types-core = "0.1.7" @@ -16,3 +17,7 @@ starknet-types-core = "0.1.7" git = 'https://github.com/FuzzingLabs/cairo-rs' rev = '48af153240392992f18a09e969bae6518eec9639' package = 'cairo-felt' + +[features] +default = ["with-runtime"] +with-runtime = ["dep:cairo-native-runtime"] \ No newline at end of file diff --git a/cairo-native-fuzzer/README.md b/cairo-native-fuzzer/README.md index 4d385f9..5f826bc 100644 --- a/cairo-native-fuzzer/README.md +++ b/cairo-native-fuzzer/README.md @@ -7,12 +7,9 @@ Cairo Native Fuzzer is a rewrite of the Cairo Fuzzer based on [Cairo native from ### Step 1 : Create a basic fuzzer based on Cairo Native : - [x] Implement the Cairo Native runner - [x] Implement the fuzzer based on Cairo Native runner -- [ ] Import existing Felt252 mutator from the cairo-fuzzer +- [x] Import existing mutator from the cairo-fuzzer ### Step 2 : Integrate existing cairo-fuzzer features into Cairo Native fuzzer : - [ ] Multithreading - [ ] Support config files - [ ] Property testing - -### Step 3 : Advanced features : -- [ ] Support `u8`, `u16`, `u32`, `u64`, `u128` and `u256` arguments \ No newline at end of file diff --git a/cairo-native-fuzzer/examples/fuzzinglabs.cairo b/cairo-native-fuzzer/examples/fuzzinglabs.cairo index 1b496d5..de8d46e 100644 --- a/cairo-native-fuzzer/examples/fuzzinglabs.cairo +++ b/cairo-native-fuzzer/examples/fuzzinglabs.cairo @@ -14,7 +14,7 @@ mod test_contract { bal:u8 } #[external(v0)] - fn greet( + fn Fuzz_symbolic_execution( ref self: ContractState, f: felt252, u: felt252,