23 unstable releases (5 breaking)

0.6.5 Sep 12, 2021
0.5.1 Aug 15, 2021
0.4.2 May 29, 2021
0.3.3 Nov 12, 2020
0.1.1 Feb 28, 2020

#28 in Caching

Download history 15/week @ 2021-06-06 1/week @ 2021-06-13 5/week @ 2021-06-20 15/week @ 2021-07-18 16/week @ 2021-07-25 30/week @ 2021-08-01 11/week @ 2021-08-08 77/week @ 2021-08-15 75/week @ 2021-08-22 1/week @ 2021-08-29 15/week @ 2021-09-12 13/week @ 2021-09-19

77 downloads per month

MIT license

145KB
3K SLoC

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.

Dependencies

~4.5MB
~93K SLoC