Skip to content

Commit

Permalink
release for open source
Browse files Browse the repository at this point in the history
  • Loading branch information
wowkster committed May 7, 2024
0 parents commit 72e073f
Show file tree
Hide file tree
Showing 65 changed files with 133,589 additions and 0 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Rust CI

on:
push:
branches: ['main']
pull_request:
branches: ['main']

env:
CARGO_TERM_COLOR: always

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Build
run: cargo build --verbose --all-features
- name: Run tests
run: cargo test --verbose
- name: Lint
run: cargo clippy
- name: Check Formatting
run: cargo fmt --check
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/target
250 changes: 250 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[workspace]
members = ["kicad_sexpr", "kicad_format"]
resolver = "2"
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2024 Adom Industries Inc.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
41 changes: 41 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# kicad_lib

[![wakatime](https://wakatime.com/badge/github/adom-inc/kicad_lib.svg)](https://wakatime.com/badge/github/adom-inc/kicad_lib)

> [!WARNING]
> This library is still in active development. All APIs and data structures are subject to change.
A Rust library for working with [KiCad](https://www.kicad.org/) files. This library handles the parsing and serialization of the KiCad file formats while also providing helpful functionality for generating and manipulating many of the internal structures used in the formats.

## Structure

- [`kicad_sexpr`](/kicad_sexpr) - A crate for parsing the KiCad S-Expression format into a friendly tree representation. If you want to parse out the tree structure agnostic to the actual KiCad data format, then this is the crate to use.
- [`kicad_format`](/kicad_format) - A crate for parsing the sexpr trees into a Rust interpretation of the structures used in the file formats. If you are only trying to manipulate the underlying data and not the S-Expression tree directly, then this is the crate to use.

## Usage

Since this library is not hosted on [crates.io](https://crates.io), to use it simply add the following to your `Cargo.toml` file:

```toml
kicad_sexpr = { git = "https://github.com/adom-inc/kicad_lib" }
```

or

```toml
kicad_format = { git = "https://github.com/adom-inc/kicad_lib" }
```

## Documentation

The documentation for this library is still work in progress, but you can bring up the documentation for the crate you are using with:

```console
$ cargo doc --package kicad_sexpr --open
```

or

```console
$ cargo doc --package kicad_format --open
```
17 changes: 17 additions & 0 deletions kicad_format/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
[package]
name = "kicad_format"
version = "0.1.0"
edition = "2021"
description = "A library for parsing KiCad 7.10 files into a more data driven representation"
authors = ["Adrian Wowk <[email protected]>"]
license = "MIT"

[dependencies]
kicad_sexpr = { path = "../kicad_sexpr" }
regex = "1.10.3"
thiserror = "1.0.56"
uuid = { version = "1.7.0", features = ["v4", "fast-rng"] }

[dev-dependencies]
ansi_term = "0.12.1"
diff = "0.1.13"
Loading

0 comments on commit 72e073f

Please sign in to comment.