Crates.io | rs2-cache |
lib.rs | rs2-cache |
version | 0.3.0 |
source | src |
created_at | 2023-03-20 14:38:48.58156 |
updated_at | 2023-04-10 15:50:23.82617 |
description | A cache library for RS2, based on OpenRS2. |
homepage | |
repository | https://github.com/osrs-rs/rs2-cache |
max_upload_size | |
id | 815328 |
size | 2,741,669 |
A RS2 cache library written in Rust, based on the OpenRS2 implementation.
It should be noted: RS2 also includes Old School Runescape.
Add the following to your Cargo.toml
file:
[dependencies]
rs2-cache = "0.3.0"
use rs2cache::Cache;
fn main() -> Result<(), rs2cache::cache::CacheError> {
let cache = Cache::open("./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(())
}
If you have new features you would like to have implemented, feel free to open a pull request. Do be advised that this repository aims to follow OpenRS2, so any edits should not deviate too far from it (if at all). For bigger features it is advised to open an issue in order to discuss it beforehand.