Skip to content

Commit 493dc9e

Browse files
bors[bot]burrbull
andauthored
Merge #154
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]>
2 parents 148419b + f038ef6 commit 493dc9e

File tree

135 files changed

+5800
-4316
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

135 files changed

+5800
-4316
lines changed

.github/bors.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ delete_merged_branches = true
33
required_approvals = 1
44
timeout_sec = 14400
55
status = [
6-
"build (1.40.0)",
6+
"build (1.46.0)",
77
"build (stable)",
88
"test",
99
"test-strict",

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
continue-on-error: ${{ matrix.experimental || false }}
1313
strategy:
1414
matrix:
15-
rust: [ 1.40.0, stable ]
15+
rust: [ 1.46.0, stable ]
1616
include:
1717
# Test nightly but don't fail the build.
1818
- rust: nightly

CHANGELOG.md

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,32 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](http://keepachangelog.com/)
66
and this project adheres to [Semantic Versioning](http://semver.org/).
77

8-
## [Unreleased]
8+
Newer releases see in [svd-rs/CHANGELOG.md](./svd-rs/CHANGELOG.md),
9+
[svd-parser/CHANGELOG.md](./svd-parser/CHANGELOG.md) and [svd-encoder/CHANGELOG.md](./svd-encoder/CHANGELOG.md).
10+
11+
## [v0.11.0] - 2021-10-02
12+
13+
- [breaking-change] Split `svd-parser` on `svd-rs`, `svd-parser` and `svd-encoder`
14+
- [breaking-change] Use `roxmltree` in `svd-parser` instead of `xmltree`
15+
for fast parsing and better error debug. `Parse` trait now requires `Config`
16+
- [breaking-change] Bump `xmltree` in `svd-encoder` to 0.10.
17+
- Fixed cluster encoding
18+
- Added `as_str`/`parse_str` for simple enums
19+
- Added `indexes` iterator for `DimElement`
20+
- For structs with builders added `modify_from` method, `validate` now public
21+
- [breaking-change] `build` and `modify_from` take `ValidateLevel`
22+
- [breaking-change] multiple `addressBlocks` now supported in `Peripheral`
23+
- Added custom `serde` (de)serializers for `BitRange`, `Register`,
24+
`Cluster` and `Field`. `camelCase` and `kebab-case` are used
25+
where it's needed to be more like SVD.
26+
- [breaking-change] `Parse`, `Encode` implementation are moved
27+
in separate modules, same with tests. Builders and `Encode`'s
28+
use enum errors now instead of dynamical `anyhow`.
29+
- [breaking-change] change encode format of some numbers to be
30+
more compatible with STM vendor's SVDs
31+
- [breaking-change] resort tags when encode
32+
- [breaking-change] Use `RegisterProperties` in `RegisterInfo`, `Peripheral` nd `Device`
33+
instead of separate `size`, `access`, `reset_value` and `reset_mask`
934

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

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

144-
[Unreleased]: https://github.com/rust-embedded/svd/compare/v0.10.2...HEAD
169+
[Unreleased]: https://github.com/rust-embedded/svd/compare/v0.11.0...HEAD
170+
[v0.11.0]: https://github.com/rust-embedded/svd/compare/v0.10.2...v0.11.0
145171
[v0.10.2]: https://github.com/rust-embedded/svd/compare/v0.10.1...v0.10.2
146172
[v0.10.1]: https://github.com/rust-embedded/svd/compare/v0.10.0...v0.10.1
147173
[v0.10.0]: https://github.com/rust-embedded/svd/compare/v0.9.0...v0.10.0

Cargo.toml

Lines changed: 6 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,7 @@
1-
[package]
2-
authors = [
3-
"The Tools Team <[email protected]>",
4-
"Jorge Aparicio <[email protected]>",
1+
[workspace]
2+
members = [
3+
"svd-rs",
4+
"svd-parser",
5+
"svd-encoder",
6+
"tests",
57
]
6-
description = "A CMSIS-SVD file parser"
7-
documentation = "https://docs.rs/svd-parser"
8-
keywords = ["CMSIS", "SVD", "parser"]
9-
license = "MIT OR Apache-2.0"
10-
name = "svd-parser"
11-
repository = "https://github.com/rust-embedded/svd"
12-
edition = "2018"
13-
version = "0.10.2"
14-
readme = "README.md"
15-
16-
[features]
17-
derive-from = []
18-
strict = []
19-
20-
[dependencies]
21-
xmltree = "0.8"
22-
anyhow = "1.0.19"
23-
thiserror = "1.0.5"
24-
rayon = "1.5.0"
25-
once_cell = "1.5.2"
26-
regex = "1"
27-
28-
[dependencies.serde]
29-
version = "1.0"
30-
features = ["derive"]
31-
optional = true
32-
33-
[dev-dependencies]
34-
serde_json = "1.0"
35-
36-
[[example]]
37-
name = "svd2json"
38-
required-features = ["serde"]

README.md

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,16 @@
1-
[![crates.io](https://img.shields.io/crates/d/svd-parser.svg)](https://crates.io/crates/svd-parser)
2-
[![crates.io](https://img.shields.io/crates/v/svd-parser.svg)](https://crates.io/crates/svd-parser)
3-
[![Continuous Integration](https://github.com/rust-embedded/svd/workflows/Continuous%20Integration/badge.svg)](https://github.com/rust-embedded/svd/actions)
4-
[![Documentation](https://docs.rs/svd-parser/badge.svg)](https://docs.rs/svd-parser)
5-
6-
# `svd-parser`
7-
8-
> A CMSIS-SVD file parser
1+
# Rust SVD manipulating libraries
92

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

12-
## ["Documentation"](https://docs.rs/svd-parser)
5+
It consists of:
6+
7+
- [`svd-rs`](https://docs.rs/svd-rs). Basic structures and builders, also (de)serializers under `serde` feature.
8+
- [`svd-parser`](https://docs.rs/svd-parser). Library for parsing SVD XML source in Rust `Device` structure.
9+
- [`svd-encoder`](https://docs.rs/svd-encoder). Library for creating SVD XML.
1310

1411
## Minimum Supported Rust Version (MSRV)
1512

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

1916
## License

release.sh

Lines changed: 0 additions & 21 deletions
This file was deleted.

src/elementext.rs

Lines changed: 0 additions & 111 deletions
This file was deleted.

src/encode.rs

Lines changed: 0 additions & 21 deletions
This file was deleted.

0 commit comments

Comments
 (0)