16 stable releases (5 major)

5.4.1 Apr 4, 2024
5.4.0 Nov 30, 2023
5.1.0 Oct 23, 2023
5.0.2 Jun 23, 2023
0.3.0 Jun 13, 2017

#193 in Development tools

Download history 14/week @ 2023-12-22 42/week @ 2023-12-29 43/week @ 2024-01-05 225/week @ 2024-01-12 165/week @ 2024-01-19 97/week @ 2024-01-26 54/week @ 2024-02-02 175/week @ 2024-02-09 92/week @ 2024-02-16 226/week @ 2024-02-23 190/week @ 2024-03-01 187/week @ 2024-03-08 103/week @ 2024-03-15 248/week @ 2024-03-22 250/week @ 2024-03-29 161/week @ 2024-04-05

787 downloads per month
Used in symbolic-proguard

BSD-3-Clause

475KB
2K 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