Skip to content

Commit 50ee12a

Browse files
committed
Move riscv-macros to root directory
1 parent bedbc41 commit 50ee12a

File tree

8 files changed

+77
-3
lines changed

8 files changed

+77
-3
lines changed

.github/workflows/changelog.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ jobs:
1919
filters: |
2020
riscv:
2121
- 'riscv/**'
22+
riscv-macros:
23+
- 'riscv-macros/**'
2224
riscv-pac:
2325
- 'riscv-pac/**'
2426
riscv-peripheral:
@@ -37,6 +39,14 @@ jobs:
3739
changeLogPath: ./riscv/CHANGELOG.md
3840
skipLabels: 'skip changelog'
3941
missingUpdateErrorMessage: 'Please add a changelog entry in the riscv/CHANGELOG.md file.'
42+
43+
- name: Check for CHANGELOG.md (riscv-macros)
44+
if: steps.changes.outputs.riscv-macros == 'true'
45+
uses: dangoslen/changelog-enforcer@v3
46+
with:
47+
changeLogPath: ./riscv-macros/CHANGELOG.md
48+
skipLabels: 'skip changelog'
49+
missingUpdateErrorMessage: 'Please add a changelog entry in the riscv-macros/CHANGELOG.md file.'
4050

4151
- name: Check for CHANGELOG.md (riscv-pac)
4252
if: steps.changes.outputs.riscv-pac == 'true'

Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
resolver = "2"
33
members = [
44
"riscv",
5+
"riscv-macros",
56
"riscv-pac",
67
"riscv-peripheral",
78
"riscv-rt",
@@ -13,6 +14,7 @@ members = [
1314

1415
default-members = [
1516
"riscv",
17+
"riscv-macros",
1618
"riscv-pac",
1719
"riscv-peripheral",
1820
"riscv-rt",

riscv-macros/CHANGELOG.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Change Log
2+
3+
All notable changes to this project will be documented in this file.
4+
5+
The format is based on [Keep a Changelog](http://keepachangelog.com/)
6+
and this project adheres to [Semantic Versioning](http://semver.org/).
7+
8+
## [Unreleased]
9+
10+
### Added
11+
12+
- New `rt` and `rt-v-trap` features to opt-in `riscv-rt`-related code in `riscv::pac_enum` macro.
13+
14+
### Changed
15+
16+
- Moved from `riscv/macros/` to `riscv-macros/`
17+
- Now, `riscv::pac_enum` macro only includes trap-related code if `rt` or `rt-v-trap` features are enabled.
18+
19+
## [v0.3.0] - 2025-09-08
20+
21+
This crate was placed inside `riscv/`. Check `riscv/CHANGELOG.md` for details

riscv/macros/Cargo.toml renamed to riscv-macros/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ authors = [
44
]
55
categories = ["embedded", "no-std"]
66
description = "Procedural macros re-exported in `riscv`"
7-
documentation = "https://docs.rs/riscv"
7+
documentation = "https://docs.rs/riscv-macros"
88
keywords = ["riscv", "register", "peripheral"]
99
license = "MIT OR Apache-2.0"
1010
name = "riscv-macros"

riscv-macros/README.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
[![crates.io](https://img.shields.io/crates/d/riscv-macros.svg)](https://crates.io/crates/riscv-macros)
2+
[![crates.io](https://img.shields.io/crates/v/riscv-macros.svg)](https://crates.io/crates/riscv-macros)
3+
4+
# `riscv-macros`
5+
6+
> Procedural macros for the `riscv` crate.
7+
8+
This project is developed and maintained by the [RISC-V team][team].
9+
10+
## [Documentation](https://docs.rs/crate/riscv)
11+
12+
## Minimum Supported Rust Version (MSRV)
13+
14+
This crate is guaranteed to compile on stable Rust 1.61 and up. It *might*
15+
compile with older versions but that may change in any new patch release.
16+
17+
## License
18+
19+
Copyright 2024-2025 [RISC-V team][team]
20+
21+
Permission to use, copy, modify, and/or distribute this software for any purpose
22+
with or without fee is hereby granted, provided that the above copyright notice
23+
and this permission notice appear in all copies.
24+
25+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
26+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
27+
FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
28+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
29+
OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
30+
TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
31+
THIS SOFTWARE.
32+
33+
## Code of Conduct
34+
35+
Contribution to this crate is organized under the terms of the [Rust Code of
36+
Conduct][CoC], the maintainer of this crate, the [RISC-V team][team], promises
37+
to intervene to uphold that code of conduct.
38+
39+
[CoC]: ../CODE_OF_CONDUCT.md
40+
[team]: https://github.com/rust-embedded/wg#the-risc-v-team
File renamed without changes.

riscv/CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,9 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
1414
- Improved assembly macro handling in asm.rs
1515
- New `rt` and `rt-v-trap` features to opt-in `riscv-rt`-related code in `riscv::pac_enum` macro.
1616

17-
# Changed
17+
### Changed
1818

19+
- Moved macros from `./macros/` to `../riscv-macros/`
1920
- Bump MSRV to 1.68 for latest version of syn 2.0
2021
- Now, `riscv::pac_enum` macro only includes trap-related code if `rt` or `rt-v-trap` features are enabled.
2122

riscv/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,5 +30,5 @@ rt-v-trap = ["rt", "riscv-macros/rt-v-trap"]
3030
critical-section = "1.2.0"
3131
embedded-hal = "1.0.0"
3232
riscv-pac = { path = "../riscv-pac", version = "0.2.0" }
33-
riscv-macros = { path = "macros", version = "0.3.0", optional = true }
33+
riscv-macros = { path = "../riscv-macros", version = "0.3.0", optional = true }
3434
paste = "1.0.15"

0 commit comments

Comments
 (0)