# liberty-db [![pipeline](https://github.com/zao111222333/liberty-db/actions/workflows/rust.yml/badge.svg?branch=master)](https://github.com/zao111222333/liberty-db/actions/workflows/rust.yml) [![pipeline](https://github.com/zao111222333/liberty-db/actions/workflows/static.yml/badge.svg?branch=master)](https://github.com/zao111222333/liberty-db/actions/workflows/static.yml) [![License](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT) [![liberty-db](https://shields.io/crates/v/liberty-db.svg?style=flat-square&label=liberty-db)](https://crates.io/crates/liberty-db) [![liberty-macros](https://shields.io/crates/v/liberty-macros.svg?style=flat-square&label=liberty-macros)](https://crates.io/crates/liberty-macros) [![Docs](https://docs.rs/liberty-db/badge.svg)](https://docs.rs/liberty-db) **Work in progress, unstable** ## Usage ```toml [dependencies] liberty_db = "0.4" ``` See more in [doc](https://docs.rs/liberty-db) ## Test ```shell cargo test --package liberty-tests --test tests ``` ## Testbench ```shell cargo test --package liberty-tests --lib -- parser_bench::test_all_lib_files --exact --nocapture ``` | [liberty-db](https://crates.io/crates/liberty-db) | [liberty-io](https://crates.io/crates/liberty-io) | [libertyparse](https://crates.io/crates/libertyparse) | Test Liberty File | | ---------- | ---------- | ------------ | ----------------- | | **402.79ms** | **115.81ms** | **342.70ms** | [`tests/tech/SAED32_EDK/ccs/saed32hvt_pg_ff0p95v125c.lib`](tests/tech/SAED32_EDK/ccs/saed32hvt_pg_ff0p95v125c.lib) | | **599.51ms** | **284.08ms** | **839.44ms** | [`tests/tech/SAED32_EDK/ccs/saed32hvt_dlvl_ff0p85v25c_i0p85v.lib`](tests/tech/SAED32_EDK/ccs/saed32hvt_dlvl_ff0p85v25c_i0p85v.lib) | | **83.12ms** | **40.12ms** | **122.26ms** | [`tests/tech/SAED32_EDK/nldm/saed32hvt_dlvl_ff0p85v25c_i0p85v.lib`](tests/tech/SAED32_EDK/nldm/saed32hvt_dlvl_ff0p85v25c_i0p85v.lib) | | **4.50s** | **1.48s** | **PANIC** | [`tests/tech/SAED32_EDK/nldm/saed32hvt_ff0p85v25c.lib`](tests/tech/SAED32_EDK/nldm/saed32hvt_ff0p85v25c.lib) | | **3.00ms** | **20.58ms** | **5.08ms** | [`tests/tech/freepdk45/gscl45nm.lib`](tests/tech/freepdk45/gscl45nm.lib) | | **125.41µs** | **FAIL** | **FAIL** | [`tests/tech/cases/no_semicolon.lib`](tests/tech/cases/no_semicolon.lib) | | **66.77µs** | **FAIL** | **131.15µs** | [`tests/tech/cases/formula.lib`](tests/tech/cases/formula.lib) | | **16.04ms** | **8.67ms** | **25.57ms** | [`tests/tech/cases/ocv.lib`](tests/tech/cases/ocv.lib) | | **13.69ms** | **6.76ms** | **FAIL** | [`tests/tech/sky130/sky130_fd_sc_hs__bufinv_8__tt_1p80V_25C_ccsnoise.cell.lib`](tests/tech/sky130/sky130_fd_sc_hs__bufinv_8__tt_1p80V_25C_ccsnoise.cell.lib) | | **2.13s** | **870.17ms** | **2.85s** | [`tests/tech/nangate/NangateOpenCellLibrary_typical.lib`](tests/tech/nangate/NangateOpenCellLibrary_typical.lib) | ## TODO List + remove `GroupWapper`, `ComplexWapper`, `SimpleWapper`. At leaset remove it in parser and formatter + merge fields of `timing` at parse phase ``` impl __timing::ImmutIdTiming { xxx } ``` + use PDFJS + stream input + Linked Group + Timing group + ~~fix missing newline at endding~~ + ~~recursive parse boolean expression~~ + ~~macros~~ + ~~format to `liberty`~~ + ~~support multi-line `\`~~ + ~~support comment~~ + ~~Use `MutSet` to store GroupMap~~