https://github.com/spikehd/rsrpc
Rust implementation of the Discord RPC server
https://github.com/spikehd/rsrpc
discord discord-rpc rpc rpc-server rust rust-lang
Last synced: about 2 months ago
JSON representation
Rust implementation of the Discord RPC server
- Host: GitHub
- URL: https://github.com/spikehd/rsrpc
- Owner: SpikeHD
- License: mit
- Created: 2023-08-16T00:04:20.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2025-03-12T15:53:54.000Z (2 months ago)
- Last Synced: 2025-03-18T02:12:57.264Z (2 months ago)
- Topics: discord, discord-rpc, rpc, rpc-server, rust, rust-lang
- Language: Rust
- Homepage:
- Size: 229 KB
- Stars: 22
- Watchers: 1
- Forks: 3
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Features
* Process detection
* IPC/Socket-based RPC detection
* Websocket-based RPC detection
* `INVITE_BROWSER` support
* Adding new processes on the fly
* Manually triggering scans# Building
## Requirements
- [Cargo and Rust](https://www.rust-lang.org/)
## Testing it out
1. Download a binary from [releases](https://github.com/SpikeHD/rsRPC/releases), [GitHub Actions](https://www.github.com/SpikeHD/rsRPC/actions) or build it yourself below!
2. If you just want to use the default detectable list, just run the binary!
3. If you want to use your own detectable list, place a `detectable.json` file in the same directory as the binary (you can use [the arRPC one](https://raw.githubusercontent.com/OpenAsar/arrpc/main/src/process/detectable.json) as an example), then run the binary with `./rsrpc-cli -d ./detectable.json`## Building the binary
1. Clone the repository
2. `cargo build -p rsrpc-cli --release`
3. Your file will be in `target/release/`## Using as a library
1. Add the following to your `Cargo.toml` file:
```toml
[dependencies]
rsrpc = { git = "https://www.github.com/SpikeHD/rsRPC", tag = "VERSION_NUMBER_HERE" }
```2. Use the library in your code:
```rust
use rsrpc::{RPCServer, RPCConfig};fn main() {
let mut server = RPCServer::from_file("./detectable.json", RPCConfig::default());
server.start();
}
```You can also grab the `detectable.json` programmatically and pass it via string:
```rust
use rsrpc::{RPCServer, RPCConfig};fn main() {
let detectable = reqwest::blocking::get("https://raw.githubusercontent.com/OpenAsar/arrpc/main/src/process/detectable.json")?.text()?;
let mut server = RPCServer::from_json_str(detectable, RPCConfig::default());server.start();
}
```