14 releases (stable)

new 5.0.1 Mar 23, 2023
5.0.0 May 20, 2022
4.1.1 Mar 19, 2021
4.0.1 Jun 9, 2020
0.3.0 Jun 13, 2017

#217 in Development tools

Download history 127/week @ 2022-12-01 118/week @ 2022-12-08 113/week @ 2022-12-15 84/week @ 2022-12-22 92/week @ 2022-12-29 100/week @ 2023-01-05 77/week @ 2023-01-12 125/week @ 2023-01-19 154/week @ 2023-01-26 157/week @ 2023-02-02 156/week @ 2023-02-09 253/week @ 2023-02-16 120/week @ 2023-02-23 107/week @ 2023-03-02 149/week @ 2023-03-09 83/week @ 2023-03-16

481 downloads per month
Used in symbolic-proguard

BSD-3-Clause

465KB
1.5K SLoC

Rust Proguard Parser

A simple Rust library that implements basic proguard handling.

Documentation

Release Management

We use craft to release new versions.


lib.rs:

This crate implements handling of proguard mapping files.

The main use case is to re-map classes or complete stack frames, but it can also be used to parse a proguard mapping line-by-line.

The uuid feature also allows getting the UUID of the proguard file.

Examples

let mapping = r#"
android.arch.core.internal.SafeIterableMap -> a.a.a.b.c:
    13:13:java.util.Map$Entry eldest():168:168 -> a
"#;
let mapper = proguard::ProguardMapper::from(mapping);

// re-mapping a classname
assert_eq!(
    mapper.remap_class("a.a.a.b.c"),
    Some("android.arch.core.internal.SafeIterableMap"),
);

// re-map a stack frame
assert_eq!(
    mapper
        .remap_frame(&proguard::StackFrame::new("a.a.a.b.c", "a", 13))
        .collect::<Vec<_>>(),
    vec![proguard::StackFrame::new(
        "android.arch.core.internal.SafeIterableMap",
        "eldest",
        168
    )],
);

Dependencies