Skip to content

Commit

Permalink
Merge #154
Browse files Browse the repository at this point in the history
154: Full rework r=Emilgardis a=burrbull

`svd-parser` now splitted on 3 crates in 1 workspace:
- `svd-rs` core (basic structures and builders, also (de)serializers under `serde` feature)
- `svd-parser` (uses read-only ultra-fast `roxmltree` underhood, reexports `svd-rs` as `svd`)
- `svd-encoder` (previously `unproven`. Uses `xmltree` updated to 0.10)


Co-authored-by: Andrey Zgarbul <[email protected]>
  • Loading branch information
bors[bot] and burrbull authored Oct 4, 2021
2 parents 148419b + f038ef6 commit 493dc9e
Show file tree
Hide file tree
Showing 135 changed files with 5,800 additions and 4,316 deletions.
2 changes: 1 addition & 1 deletion .github/bors.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ delete_merged_branches = true
required_approvals = 1
timeout_sec = 14400
status = [
"build (1.40.0)",
"build (1.46.0)",
"build (stable)",
"test",
"test-strict",
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
continue-on-error: ${{ matrix.experimental || false }}
strategy:
matrix:
rust: [ 1.40.0, stable ]
rust: [ 1.46.0, stable ]
include:
# Test nightly but don't fail the build.
- rust: nightly
Expand Down
30 changes: 28 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,32 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/)
and this project adheres to [Semantic Versioning](http://semver.org/).

## [Unreleased]
Newer releases see in [svd-rs/CHANGELOG.md](./svd-rs/CHANGELOG.md),
[svd-parser/CHANGELOG.md](./svd-parser/CHANGELOG.md) and [svd-encoder/CHANGELOG.md](./svd-encoder/CHANGELOG.md).

## [v0.11.0] - 2021-10-02

- [breaking-change] Split `svd-parser` on `svd-rs`, `svd-parser` and `svd-encoder`
- [breaking-change] Use `roxmltree` in `svd-parser` instead of `xmltree`
for fast parsing and better error debug. `Parse` trait now requires `Config`
- [breaking-change] Bump `xmltree` in `svd-encoder` to 0.10.
- Fixed cluster encoding
- Added `as_str`/`parse_str` for simple enums
- Added `indexes` iterator for `DimElement`
- For structs with builders added `modify_from` method, `validate` now public
- [breaking-change] `build` and `modify_from` take `ValidateLevel`
- [breaking-change] multiple `addressBlocks` now supported in `Peripheral`
- Added custom `serde` (de)serializers for `BitRange`, `Register`,
`Cluster` and `Field`. `camelCase` and `kebab-case` are used
where it's needed to be more like SVD.
- [breaking-change] `Parse`, `Encode` implementation are moved
in separate modules, same with tests. Builders and `Encode`'s
use enum errors now instead of dynamical `anyhow`.
- [breaking-change] change encode format of some numbers to be
more compatible with STM vendor's SVDs
- [breaking-change] resort tags when encode
- [breaking-change] Use `RegisterProperties` in `RegisterInfo`, `Peripheral` nd `Device`
instead of separate `size`, `access`, `reset_value` and `reset_mask`

## [v0.10.2] - 2021-04-30

Expand Down Expand Up @@ -141,7 +166,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
- Initial SVD parser
- A `parse` utility function to parse the contents of a SVD file (XML)

[Unreleased]: https://github.com/rust-embedded/svd/compare/v0.10.2...HEAD
[Unreleased]: https://github.com/rust-embedded/svd/compare/v0.11.0...HEAD
[v0.11.0]: https://github.com/rust-embedded/svd/compare/v0.10.2...v0.11.0
[v0.10.2]: https://github.com/rust-embedded/svd/compare/v0.10.1...v0.10.2
[v0.10.1]: https://github.com/rust-embedded/svd/compare/v0.10.0...v0.10.1
[v0.10.0]: https://github.com/rust-embedded/svd/compare/v0.9.0...v0.10.0
Expand Down
43 changes: 6 additions & 37 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,38 +1,7 @@
[package]
authors = [
"The Tools Team <[email protected]>",
"Jorge Aparicio <[email protected]>",
[workspace]
members = [
"svd-rs",
"svd-parser",
"svd-encoder",
"tests",
]
description = "A CMSIS-SVD file parser"
documentation = "https://docs.rs/svd-parser"
keywords = ["CMSIS", "SVD", "parser"]
license = "MIT OR Apache-2.0"
name = "svd-parser"
repository = "https://github.com/rust-embedded/svd"
edition = "2018"
version = "0.10.2"
readme = "README.md"

[features]
derive-from = []
strict = []

[dependencies]
xmltree = "0.8"
anyhow = "1.0.19"
thiserror = "1.0.5"
rayon = "1.5.0"
once_cell = "1.5.2"
regex = "1"

[dependencies.serde]
version = "1.0"
features = ["derive"]
optional = true

[dev-dependencies]
serde_json = "1.0"

[[example]]
name = "svd2json"
required-features = ["serde"]
17 changes: 7 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,16 @@
[![crates.io](https://img.shields.io/crates/d/svd-parser.svg)](https://crates.io/crates/svd-parser)
[![crates.io](https://img.shields.io/crates/v/svd-parser.svg)](https://crates.io/crates/svd-parser)
[![Continuous Integration](https://github.com/rust-embedded/svd/workflows/Continuous%20Integration/badge.svg)](https://github.com/rust-embedded/svd/actions)
[![Documentation](https://docs.rs/svd-parser/badge.svg)](https://docs.rs/svd-parser)

# `svd-parser`

> A CMSIS-SVD file parser
# Rust SVD manipulating libraries

This project is developed and maintained by the [Tools team][team].

## ["Documentation"](https://docs.rs/svd-parser)
It consists of:

- [`svd-rs`](https://docs.rs/svd-rs). Basic structures and builders, also (de)serializers under `serde` feature.
- [`svd-parser`](https://docs.rs/svd-parser). Library for parsing SVD XML source in Rust `Device` structure.
- [`svd-encoder`](https://docs.rs/svd-encoder). Library for creating SVD XML.

## Minimum Supported Rust Version (MSRV)

This crate is guaranteed to compile on stable Rust 1.40.0 and up. It *might*
This crate is guaranteed to compile on stable Rust 1.46.0 and up. It *might*
compile with older versions but that may change in any new patch release.

## License
Expand Down
21 changes: 0 additions & 21 deletions release.sh

This file was deleted.

111 changes: 0 additions & 111 deletions src/elementext.rs

This file was deleted.

21 changes: 0 additions & 21 deletions src/encode.rs

This file was deleted.

Loading

0 comments on commit 493dc9e

Please sign in to comment.