Skip to content

Commit f07e14f

Browse files
committed
Add "Integration" to README and update some wording
1 parent 2d24bcf commit f07e14f

File tree

1 file changed

+46
-3
lines changed

1 file changed

+46
-3
lines changed

README.md

Lines changed: 46 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,58 @@ A modern, high-performance library for C++20 designed around game hacking
55
- Windows x86/x64 support
66
- Partial Linux and macOS support
77
- Vectorized scanning for byte patterns
8+
- SSE and AVX2 on x86/x64
9+
- AVX-512 on x64
810
- RAII memory protector
911
- Convenience wrappers over OS APIs
10-
- Language bindings (C, C#, etc.)
12+
- Language bindings (C, C#, Java)
1113

1214
## Versioning
1315
This project adheres to [semantic versioning](https://semver.org/spec/v2.0.0.html). Any declaration that
1416
is within a `detail` or `experimental` namespace is not considered part of the public API, and usage
1517
may break at any time without the MAJOR version number being incremented.
1618

19+
## Integration
20+
21+
The best supported way to use libhat is via [FetchContent](https://cmake.org/cmake/help/latest/module/FetchContent.html)
22+
or [CPM](https://github.com/cpm-cmake/CPM.cmake) in a CMake project:
23+
24+
```cmake
25+
FetchContent_Declare(
26+
libhat
27+
GIT_REPOSITORY https://github.com/BasedInc/libhat.git
28+
GIT_TAG v0.8.0
29+
)
30+
FetchContent_MakeAvailable(libhat)
31+
32+
target_link_libraries(my_target libhat::libhat)
33+
```
34+
35+
```cmake
36+
CPMAddPackage("gh:BasedInc/libhat#v0.8.0")
37+
38+
target_link_libraries(my_target libhat::libhat)
39+
```
40+
41+
If you are using [xmake](https://xmake.io/), an [official package](https://github.com/xmake-io/xmake-repo/blob/dev/packages/l/libhat) is available:
42+
```lua
43+
add_requires("libhat v0.7.0")
44+
45+
target("my_target")
46+
add_packages("libhat")
47+
```
48+
49+
If you are using [MSBuild](https://learn.microsoft.com/en-us/visualstudio/msbuild) or another build system, a
50+
[vcpkg port](https://github.com/microsoft/vcpkg/tree/master/ports/libhat) is available:
51+
52+
```json
53+
{
54+
"dependencies": [
55+
"libhat"
56+
]
57+
}
58+
```
59+
1760
## Benchmarks
1861
The table below compares the single threaded throughput in bytes/s (real time) between
1962
libhat and [two other](test/benchmark/vendor) commonly used implementations for pattern
@@ -55,7 +98,7 @@ BM_Throughput_UC2/256MiB 261157833 ns 261160714 ns
5598

5699
## Platforms
57100

58-
Below is a summary of the support of libhat OS APIs on various platforms:
101+
Below is a summary of the current support for libhat's platform-dependent APIs:
59102

60103
| | Windows | Linux | macOS |
61104
|--------------------------------|:-------:|:-----:|:-----:|
@@ -161,7 +204,7 @@ hat::scan_result result = hat::find_pattern(range, pattern, hat::scan_align
161204
hat::scan_result result = hat::find_pattern(range, pattern, hat::scan_alignment::X1, hat::scan_hint::x86_64);
162205
```
163206

164-
### Accessing offsets
207+
### Accessing members
165208
```cpp
166209
#include <libhat/access.hpp>
167210

0 commit comments

Comments
 (0)