Skip to content

Commit 35c216f

Browse files
authored
feat(cache): Expose current cache version constant (#56)
1 parent 7c50fc2 commit 35c216f

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

src/cache/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ use thiserror::Error;
5252
use crate::mapper::{format_cause, format_frames, format_throwable};
5353
use crate::{java, stacktrace, DeobfuscatedSignature, StackFrame, StackTrace, Throwable};
5454

55-
pub use raw::ProguardCache;
55+
pub use raw::{ProguardCache, PRGCACHE_VERSION};
5656

5757
/// Errors returned while loading/parsing a serialized [`ProguardCache`].
5858
///

src/cache/raw.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ pub(crate) const PRGCACHE_MAGIC: u32 = u32::from_le_bytes(PRGCACHE_MAGIC_BYTES);
1818
/// The byte-flipped magic, which indicates an endianness mismatch.
1919
pub(crate) const PRGCACHE_MAGIC_FLIPPED: u32 = PRGCACHE_MAGIC.swap_bytes();
2020

21+
/// The current version of the ProguardCache format.
2122
pub const PRGCACHE_VERSION: u32 = 2;
2223

2324
/// The header of a proguard cache file.

src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ mod mapper;
4242
mod mapping;
4343
mod stacktrace;
4444

45-
pub use cache::{CacheError, CacheErrorKind, ProguardCache};
45+
pub use cache::{CacheError, CacheErrorKind, ProguardCache, PRGCACHE_VERSION};
4646
pub use mapper::{DeobfuscatedSignature, ProguardMapper, RemappedFrameIter};
4747
pub use mapping::{
4848
LineMapping, MappingSummary, ParseError, ParseErrorKind, ProguardMapping, ProguardRecord,

0 commit comments

Comments
 (0)