osrs-cache
A low-level API for interfacing with the Oldschool Runescape cache.
This crate also includes a high-level API that is written in Rust, the usage of it is detailed in the Installation section.
Installation
Add this to your Cargo.toml
file:
[dependencies]
osrs-cache = "0.3.0"
Example
use osrscache::Cache;
fn main() -> Result<(), osrscache::Error> {
let cache = Cache::open("./data/osrs_cache")?;
let index_id = 2; // Config index
let archive_id = 10; // Item definitions archive
let file_id = 1042; // Blue Partyhat file
let buffer = cache.read(index_id, archive_id, file_id)?;
Ok(())
}
Contributing
If you have suggestions for features, or want to add for example a new loader for the cache, feel free to make a pull request. For bigger features it is advised to open an issue in order to discuss it beforehand.
Examples can be found in the examples directory which include the osrs update protocol.