From f752acc2a48da6ea9f702fb8f349a47eb588fec7 Mon Sep 17 00:00:00 2001 From: Dominik Maier Date: Thu, 3 Aug 2023 02:35:37 +0200 Subject: [PATCH] Info about how to migrate to 0.11 (#1395) --- docs/src/SUMMARY.md | 1 + docs/src/design/migration-0.11.md | 26 ++++++++++++++++++++++++++ 2 files changed, 27 insertions(+) create mode 100644 docs/src/design/migration-0.11.md diff --git a/docs/src/SUMMARY.md b/docs/src/SUMMARY.md index 50f0df211b..0c4134d35c 100644 --- a/docs/src/SUMMARY.md +++ b/docs/src/SUMMARY.md @@ -25,6 +25,7 @@ - [Architecture](./design/architecture.md) - [Metadata](./design/metadata.md) - [Migrating from LibAFL <0.9 to 0.9](./design/migration-0.9.md) + - [Migrating from LibAFL <0.11 to 0.11](./design/migration-0.11.md) - [Message Passing](./message_passing/message_passing.md) - [Spawning Instances](./message_passing/spawn_instances.md) diff --git a/docs/src/design/migration-0.11.md b/docs/src/design/migration-0.11.md new file mode 100644 index 0000000000..9156f8cb85 --- /dev/null +++ b/docs/src/design/migration-0.11.md @@ -0,0 +1,26 @@ +# Migrating from LibAFL <0.11 to 0.11 + +We moved the old `libafl::bolts` module to its own crate called `libafl_bolts`. +For this, imports for types in LibAFL bolts have changed in version 0.11, everything else should remain the same. + +## Reasons for This Change + +With the change we can now use a lot of low-level features of LibAFL for projects that are unrelated to fuzzing, or just completely different to LibAFL. +Some cross-platform things in bolts include + +* SerdeAnyMap: a map that stores and retrieves elements by type and is serializable and deserializable +* ShMem: A cross-platform (Windows, Linux, Android, MacOS) shared memory implementation +* LLMP: A fast, lock-free IPC mechanism via SharedMap +* Core_affinity: A maintained version of `core_affinity` that can be used to get core information and bind processes to cores +* Rands: Fast random number generators for fuzzing (like [RomuRand](http://www.romu-random.org/)) +* Tuples: Haskel-like compile-time tuple lists +* Os: OS specific stuff like signal handling, windows exception handling, pipes, and helpers for `fork` + +## What changed + +You will need to move all `libafl::bolts::` imports to `libafl_bolts:::` and add the crate dependency in your Cargo.toml (and specify feature flags there). +As only exception, the `libafl::bolts::launcher::Launcher` has moved to `libafl::events::launcher::Launcher` since it has fuzzer and `EventManager` specific code. +If you are using `prelude`, you may need to also ad `libafl_bolts::prelude`. + +That's it. +Enjoy using `libafl_bolts` in other projects.