#runescape #osrs #cache #file #oldschool #high-level #system

osrs-cache

A cache library for the Oldschool Runescape JS5 file system

5 unstable releases

0.2.2 Feb 3, 2022
0.2.1 Feb 3, 2022
0.2.0 Feb 3, 2022
0.1.0 Dec 29, 2021
0.0.0 Dec 27, 2021

#1015 in Filesystem

MIT license

115KB
2.5K SLoC

osrs-cache

Build API Crate dependency status OSRS Version Discord

A read-only, high-level, virtual file API for the RuneScape cache.

This crate is based on the rs-cache crate by jimvdl.

Installation

Add this to your Cargo.toml file:

[dependencies]
osrs-cache = "0.2.2"

Example

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(())
}

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.

Credits

The following sources aided with the development of this crate:

License

osrs-cache is distributed under the terms of the MIT license.

See LICENSE for details.

Dependencies

~2.8–4MB
~73K SLoC