Skip to content

Commit dc39263

Browse files
committed
Rename axconfig-gen-macros to axconfig-macros, bump to v0.2.0
1 parent 80423ad commit dc39263

File tree

9 files changed

+81
-65
lines changed

9 files changed

+81
-65
lines changed

Cargo.lock

Lines changed: 60 additions & 46 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@ resolver = "2"
33

44
members = [
55
"axconfig-gen",
6-
"axconfig-gen-macros",
6+
"axconfig-macros",
77
]
88

99
[workspace.package]
10-
version = "0.1.0"
10+
version = "0.2.0"
1111
edition = "2021"
1212
authors = ["Yuekai Jia <equation618@gmail.com>"]
1313
license = "GPL-3.0-or-later OR Apache-2.0 OR MulanPSL-2.0"
1414
homepage = "https://github.com/arceos-org/arceos"
15-
repository = "https://github.com/arceos-org/axconfig-gen"
15+
repository = "https://github.com/arceos-org/axconfig_crates"
1616
keywords = ["arceos", "config", "toml"]

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
[![CI](https://github.com/arceos-org/axconfig-gen/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/arceos-org/axconfig-gen/actions/workflows/ci.yml)
44

55
* [axconfig-gen](axconfig-gen): A TOML-based configuration generation tool for [ArceOS](https://github.com/arceos-org/arceos). [![Crates.io](https://img.shields.io/crates/v/axconfig-gen)](https://crates.io/crates/axconfig-gen)[![Docs.rs](https://docs.rs/axconfig-gen/badge.svg)](https://docs.rs/axconfig-gen)
6-
* [axconfig-gen-macros](axconfig-gen-macros): Procedural macros for converting TOML format configurations to Rust constant definitions. [![Crates.io](https://img.shields.io/crates/v/axconfig-gen-macros)](https://crates.io/crates/axconfig-gen-macros)[![Docs.rs](https://docs.rs/axconfig-gen-macros/badge.svg)](https://docs.rs/axconfig-gen-macros)
6+
* [axconfig-macros](axconfig-macros): Procedural macros for converting TOML format configurations to Rust constant definitions. [![Crates.io](https://img.shields.io/crates/v/axconfig-macros)](https://crates.io/crates/axconfig-macros)[![Docs.rs](https://docs.rs/axconfig-macros/badge.svg)](https://docs.rs/axconfig-macros)
77

88
### Executable Usage
99

@@ -67,7 +67,7 @@ pub mod hello {
6767
### Macro Usage
6868

6969
```rust
70-
axconfig_gen_macros::parse_configs!(r#"
70+
axconfig_macros::parse_configs!(r#"
7171
are-you-ok = true
7272
one-two-three = 123
7373
@@ -100,9 +100,9 @@ pub mod hello {
100100
You can also include the configuration file directly:
101101

102102
```rust
103-
axconfig_gen_macros::include_configs!("path/to/config.toml");
103+
axconfig_macros::include_configs!("path/to/config.toml");
104104
// or specify the config file path via an environment variable
105-
axconfig_gen_macros::include_configs!(path_env = "AX_CONFIG_PATH");
105+
axconfig_macros::include_configs!(path_env = "AX_CONFIG_PATH");
106106
// or with a fallback path if the environment variable is not set
107-
axconfig_gen_macros::include_configs!(path_env = "AX_CONFIG_PATH", fallback = "path/to/defconfig.toml");
107+
axconfig_macros::include_configs!(path_env = "AX_CONFIG_PATH", fallback = "path/to/defconfig.toml");
108108
```

axconfig-gen/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ name = "axconfig-gen"
33
description = "A TOML-based configuration generation tool for ArceOS."
44
documentation = "https://docs.rs/axconfig-gen"
55
categories = ["config", "parsing", "parser-implementations"]
6+
rust-version = "1.76"
67
keywords.workspace = true
78
version.workspace = true
89
edition.workspace = true

axconfig-gen/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,6 @@ pub mod hello {
6363

6464
### Related libraries
6565

66-
There is also a procedural macro library [`axconfig-gen-macros`](https://docs.rs/axconfig-gen-macros) that can be
66+
There is also a procedural macro library [`axconfig-macros`](https://docs.rs/axconfig-macros) that can be
6767
used to include TOML files in your project and convert them to Rust code at
6868
compile time.

axconfig-gen-macros/Cargo.toml renamed to axconfig-macros/Cargo.toml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
[package]
2-
name = "axconfig-gen-macros"
2+
name = "axconfig-macros"
33
description = "Procedural macros for converting TOML format configurations to Rust constant definitions."
4-
documentation = "https://docs.rs/axconfig-gen-macros"
4+
documentation = "https://docs.rs/axconfig-macros"
55
categories = ["development-tools::procedural-macro-helpers", "config", "parsing", "parser-implementations"]
6+
rust-version = "1.75"
67
keywords.workspace = true
78
version.workspace = true
89
edition.workspace = true
@@ -18,7 +19,7 @@ nightly = []
1819
proc-macro2 = "1.0"
1920
quote = "1.0"
2021
syn = { version = "2.0", features = ["full"] }
21-
axconfig-gen = { path = "../axconfig-gen", version = "0.1.0" }
22+
axconfig-gen = { path = "../axconfig-gen", version = "0.2" }
2223

2324
[lib]
2425
proc-macro = true

axconfig-gen-macros/README.md renamed to axconfig-macros/README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
# axconfig-gen-macros
1+
# axconfig-macros
22

33
Procedural macros for converting TOML format configurations to equivalent Rust constant definitions.
44

55
## Example
66

77
```rust
8-
axconfig_gen_macros::parse_configs!(r#"
8+
axconfig_macros::parse_configs!(r#"
99
are-you-ok = true
1010
one-two-three = 123
1111
@@ -40,9 +40,9 @@ pub mod hello {
4040
You can also include the configuration file directly:
4141

4242
```rust,ignore
43-
axconfig_gen_macros::include_configs!("path/to/config.toml");
43+
axconfig_macros::include_configs!("path/to/config.toml");
4444
// or specify the config file path via an environment variable
45-
axconfig_gen_macros::include_configs!(path_env = "AX_CONFIG_PATH");
45+
axconfig_macros::include_configs!(path_env = "AX_CONFIG_PATH");
4646
// or with a fallback path if the environment variable is not set
47-
axconfig_gen_macros::include_configs!(path_env = "AX_CONFIG_PATH", fallback = "path/to/defconfig.toml");
47+
axconfig_macros::include_configs!(path_env = "AX_CONFIG_PATH", fallback = "path/to/defconfig.toml");
4848
```

axconfig-gen-macros/src/lib.rs renamed to axconfig-macros/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ pub fn include_configs(args: TokenStream) -> TokenStream {
8181
};
8282

8383
quote! {
84-
::axconfig_gen_macros::parse_configs!(#config_toml);
84+
::axconfig_macros::parse_configs!(#config_toml);
8585
}
8686
.into()
8787
}

axconfig-gen-macros/tests/example_config.rs renamed to axconfig-macros/tests/example_config.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#[macro_use]
2-
extern crate axconfig_gen_macros;
2+
extern crate axconfig_macros;
33

44
mod config {
55
include_configs!("../example-configs/defconfig.toml"); // root: CARGO_MANIFEST_DIR

0 commit comments

Comments
 (0)