-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 72e073f
Showing
65 changed files
with
133,589 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/target |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[workspace] | ||
members = ["kicad_sexpr", "kicad_format"] | ||
resolver = "2" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" |
Oops, something went wrong.