gdsii
v0.1.0
Published
GDSII file format parser
Downloads
5
Readme
gdsii
GDSII file format parser for JavaScript.
Copyright (C) 2024, Tiny Tapeout LTD.
Usage
Install the package using npm:
npm install gdsii
Then you can use the parser in your code. Here's a minimal Node.js example that parses a GDS file and prints all records:
import { parseGDS, RecordType } from 'gdsii';
import fs from 'fs';
const gds = fs.readFileSync('path/to/your/file.gds');
for (const { tag, data } of parseGDS(gds)) {
console.log(`${RecordType[tag]}:`, data);
}
Minimal SVG renderer example
The example directory contains a minimal SVG renderer that runs in the browser. You can run it by cloning the repository and running:
npm install
npm start
Running the tests
npm test
License
This project is licensed under either the MIT or Apache 2.0 license, at your option.