osrs-cache

Crates.ioosrs-cache
lib.rsosrs-cache
version0.2.2
sourcesrc
created_at2021-12-27 23:22:38.521509
updated_at2022-02-03 14:00:39.6638
descriptionA cache library for the Oldschool Runescape JS5 file system.
homepage
repositoryhttps://github.com/runecore/osrs-cache
max_upload_size
id503915
size126,466
Sage (Sages0ft)

documentation

https://docs.rs/osrs-cache

README

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.

Commit count: 68

cargo fmt