-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
21fa421
commit f0af3ce
Showing
3 changed files
with
34 additions
and
0 deletions.
There are no files selected for viewing
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# libunbound  | ||
|
||
Android native library for dynamically interacting with compiled Hermes. | ||
This is mainly intended to be used by Discord RNA client mods. | ||
|
||
## Usage | ||
|
||
`build.gradle.kts`: | ||
|
||
```kotlin | ||
repositories { | ||
mavenCentral() | ||
} | ||
|
||
dependencies { | ||
implementation("dev.rushii:libunbound:1.0.0") | ||
} | ||
``` | ||
|
||
Use after Hermes (`libhermes.so`) has been loaded into the process: | ||
|
||
```kotlin | ||
// Returns the HBC version supported by the loaded runtime | ||
// https://github.com/discord/hermes/blob/0.76.2-discord/include/hermes/BCGen/HBC/BytecodeVersion.h#L23 | ||
LibUnbound.getHermesRuntimeBytecodeVersion() | ||
|
||
// Check to verify whether some bytes are hermes bytecode (possibly inaccurate) | ||
LibUnbound.isHermesBytecode(/* bytes */) | ||
``` | ||
|
||
## Credits | ||
|
||
- [LSPosed](https://github.com/LSPosed/LSPosed) - ELF symbols parser | ||
- [miniz](https://github.com/richgel999/miniz) - zip lib |