pheon/README.md

67 lines
2.4 KiB
Markdown

# Pheon
Pheon reads GDSII layouts into Apache Arrow and provides command-line tools for
inspecting and comparing layout revisions. It is written in Rust, with Python
bindings and a C API.
- Inspect cells, records, and reference hierarchies.
- Compare layout objects, with text or JSON reports and Git integration.
- Read geometry into Arrow, or scan the hierarchy before loading selected cells.
Comparisons ignore timestamps and element order while preserving duplicates and
other object details. They compare object fields and coordinates exactly; see the
[comparison rules][comparison] for supported normalization and limits.
## Try the command-line tools
Install the CLI [from crates.io][crate] with Rust 1.88 or newer.
Use your own GDSII paths in the examples.
```sh
cargo install pheon --locked
pheon dump chip.gds
pheon diff before.gds after.gds
pheon hierarchy chip.gds --format mermaid
```
`diff` returns 0 for equality, 1 for differences, and 2 for invalid or incomplete
comparisons. Start with the [CLI guide][cli], then set up
[Git integration][git] if you review layouts in a repository.
## Read layouts in Python
Install the Python package [from PyPI][pypi] with Python 3.11 or newer.
```sh
python -m pip install pheon
```
Run this example from a directory containing `chip.gds`.
```python
from pheon import arrow
layout = arrow.read_path("chip.gds")
print(layout.field("lib_name")[0].as_py())
```
The Python package installs PyArrow. See the [Python guide][python] for source
installs and selected reads, and the [Arrow reference][arrow] for the returned data.
## Learn more
Browse the [documentation][docs] for layer names, native integration,
JSON reports, development, and releases. For writing, Pheon provides low-level
GDSII record helpers in Rust.
Licensed under [GPL-3.0-only][license].
[arrow]: https://mpxd.net/code/jan/pheon/src/branch/master/docs/arrow-schema.md
[cli]: https://mpxd.net/code/jan/pheon/src/branch/master/docs/cli.md
[comparison]: https://mpxd.net/code/jan/pheon/src/branch/master/docs/comparison.md
[crate]: https://crates.io/crates/pheon
[docs]: https://mpxd.net/code/jan/pheon/src/branch/master/docs/index.md
[git]: https://mpxd.net/code/jan/pheon/src/branch/master/docs/git.md
[license]: https://mpxd.net/code/jan/pheon/src/branch/master/LICENSE.md
[pypi]: https://pypi.org/project/pheon/
[python]: https://mpxd.net/code/jan/pheon/src/branch/master/docs/python.md