Crates.io | osrs-cache |
lib.rs | osrs-cache |
version | 0.2.2 |
source | src |
created_at | 2021-12-27 23:22:38.521509 |
updated_at | 2022-02-03 14:00:39.6638 |
description | A cache library for the Oldschool Runescape JS5 file system. |
homepage | |
repository | https://github.com/runecore/osrs-cache |
max_upload_size | |
id | 503915 |
size | 126,466 |
A read-only, high-level, virtual file API for the RuneScape cache.
This crate is based on the rs-cache crate by jimvdl.
Add this to your Cargo.toml
file:
[dependencies]
osrs-cache = "0.2.2"
use osrscache::Cache;
fn main() -> Result<(), osrscache::Error> {
let cache = Cache::new("./data/osrs_cache")?;
let index_id = 2; // Config index.
let archive_id = 10; // Archive containing item definitions.
let buffer = cache.read(index_id, archive_id)?;
Ok(())
}
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.
The following sources aided with the development of this crate:
osrs-cache
is distributed under the terms of the MIT license.
See LICENSE for details.