https://github.com/meguminsama/electron-hook
An in-memory Electron mod loader, built to simplify Discord modding.
https://github.com/meguminsama/electron-hook
discord electron injection modding moonlight vencord
Last synced: 6 months ago
JSON representation
An in-memory Electron mod loader, built to simplify Discord modding.
- Host: GitHub
- URL: https://github.com/meguminsama/electron-hook
- Owner: MeguminSama
- License: lgpl-3.0
- Created: 2025-01-27T19:48:30.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2025-02-06T17:21:24.000Z (8 months ago)
- Last Synced: 2025-04-12T01:09:40.186Z (6 months ago)
- Topics: discord, electron, injection, modding, moonlight, vencord
- Language: Rust
- Homepage:
- Size: 192 KB
- Stars: 14
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# electron-hook
A Rust library for loading mods into Electron applications without patching any files.
[](https://github.com/sponsors/MeguminSama)
This project was designed to ease some pain points with modding Discord, but it can be used for most Electron applications.
For some real-life uses of electron-hook, check out:
- [moonlight launcher](https://github.com/meguminsama/moonlight-launcher)
- [Vencord Launcher](https://github.com/meguminsama/vencord-launcher)# Installation
Add this to your `Cargo.toml`:
```toml
[dependencies]
electron-hook = "0.2.0"[lib]
crate-type = ["cdylib"]
```And in your `lib.rs`:
```rust
pub use electron_hook::*;
```When you build your project with `--lib` it will generate a `.dll` or `.so`, which you can pass the path of into `electron_hook::launch`
# Usage
For a better example, check out the [Documentation](https://docs.rs/electron-hook)
```rust
electron_hook::launch(&electron_executable, &library_path, &asar_path, vec![], true);
```