rs-cache 0.6.5

A simple RuneScape cache utility.
Documentation

RS-Cache

Build Crate OSRS Version RS3 Version API Minimum rustc version License

A simple-to-use basic RuneScape cache utility. RS-Cache provides utilities to interact with the RuneScape cache.

Useful links:
        Releases
        Documentation
        Examples

Quick Start

The quickest and easiest way to get started is by using OsrsCache or Rs3Cache.

use rscache::OsrsCache;

fn main() -> rscache::Result<()> {
    let cache = OsrsCache::new("./data/osrs_cache")?;

    let index_id = 2; // Config index.
    let archive_id = 10; // Archive containing item definitions.

    let buffer: Vec<u8> = cache.read(index_id, archive_id)?;

    Ok(())
}

The public API of this crate is still evolving. Currently supports both OSRS & RS3, although both are still limited.

The osrs specifications and rs3 specifications documents contain a detailed description of the design of the corresponding cache for educational purposes. Both documents are still a work in progress and are possibly incomplete.

Integration tests are running on Oldschool RuneScape version 180, which you can run at any time because the cache is included in the ./data/osrs_cache directory. RS3 Integration tests are running on version 904. The RS3 cache is too large to include on GitHub.

The minimum supported rustc version is 1.41.

This crate is passively maintained. Additional features will be implemented once they are needed for my own server. The public API of this crate is still evolving due to constant discoveries and overhauls to improve the overal usage. If you require a certain feature feel free to open an issue.

Usage

Add this to your Cargo.toml:

[dependencies]
rs-cache = "0.6"

Examples can be found in the examples directory. These examples include setting up your own custom cache or store and how the update protocol could be handled.

Acknowledgements

The following sources aided with the development of this crate:
        OpenRS
        RuneLite
        OSRS Cache Parsing Blog
        RSMod
        Librsfs
        OSRSBox
        Jagex-Store-5
        Matrix 876

License

RS-Cache is distributed under the terms of the MIT license.

See LICENSE for details.