Package Managers
vcpkg
Install vcpkg
Follow the instructions at https://github.com/microsoft/vcpkg
Python
Install from PyPI
The easiest way to install libmem for Python:Build from Source
If you want to build the Python bindings yourself:Note: If no libmem installation is found, the Python package will automatically fetch and link the library. You can use the
LIBDIR=<path> environment variable to specify a custom libmem installation path.Rust
Add libmem to yourCargo.toml:
Note: The
fetch feature is enabled by default, which automatically downloads libmem if not found. If you disable this feature, you can specify a custom path using the LIBMEM_DIR=<path> environment variable.CMake (without installing)
You can use libmem in your CMake project without installing it system-wide by usingFetchContent:
Pre-built Binaries
You can download pre-built binaries from the GitHub Releases page.Windows Users: If you download a binary version, you only need to install the Windows SDK. Add
libmem/include to your project’s include directories and link against the downloaded binary.Dependencies
libmem has several dependencies that are bundled with the project: All Platforms:- capstone (included)
- keystone (included)
- LIEF (included)
- libstdc++ (used in keystone, LIEF and LLVM)
- libmath (used in keystone)
- Windows SDK (user32.lib, psapi.lib, ntdll.lib, shell32.lib)
- libdl (
-ldl)
- libdl (
-ldl) - libkvm (
-lkvm) - libprocstat (
-lprocstat) - libelf (
-lelf)