mirror of
https://github.com/kristoferssolo/filecaster.git
synced 2025-10-21 19:00:34 +00:00
chore: package derive lib
This commit is contained in:
parent
60488d364e
commit
545b1d385f
6
.github/workflows/publish.yml
vendored
6
.github/workflows/publish.yml
vendored
@ -4,7 +4,7 @@ on:
|
|||||||
push:
|
push:
|
||||||
tags:
|
tags:
|
||||||
# Pattern syntax: https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#filter-pattern-cheat-sheet
|
# Pattern syntax: https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#filter-pattern-cheat-sheet
|
||||||
- "v[0-9]+.[0-9]+.[0-9]+*"
|
- "v[0-9]*.[0-9]*.[0-9]*"
|
||||||
# Trigger this workflow manually via workflow dispatch.
|
# Trigger this workflow manually via workflow dispatch.
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
inputs:
|
inputs:
|
||||||
@ -30,6 +30,8 @@ jobs:
|
|||||||
timeout-minutes: 25
|
timeout-minutes: 25
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
- uses: dtolnay/rust-toolchain@stable
|
- uses: dtolnay/rust-toolchain@stable
|
||||||
- name: cargo-release Cache
|
- name: cargo-release Cache
|
||||||
id: cargo_release_cache
|
id: cargo_release_cache
|
||||||
@ -57,7 +59,7 @@ jobs:
|
|||||||
# allow-branch HEAD is because GitHub actions switches
|
# allow-branch HEAD is because GitHub actions switches
|
||||||
# to the tag while building, which is a detached head
|
# to the tag while building, which is a detached head
|
||||||
|
|
||||||
run: |-
|
run: |
|
||||||
cargo release \
|
cargo release \
|
||||||
publish \
|
publish \
|
||||||
--workspace \
|
--workspace \
|
||||||
|
|||||||
6
Cargo.lock
generated
6
Cargo.lock
generated
@ -50,7 +50,7 @@ checksum = "37909eebbb50d72f9059c3b6d82c0463f2ff062c9e95845c43a6c9c0355411be"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "filecaster"
|
name = "filecaster"
|
||||||
version = "0.1.0"
|
version = "0.2.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"filecaster-derive",
|
"filecaster-derive",
|
||||||
"merge",
|
"merge",
|
||||||
@ -62,14 +62,16 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "filecaster-derive"
|
name = "filecaster-derive"
|
||||||
version = "0.1.0"
|
version = "0.2.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"claims",
|
"claims",
|
||||||
|
"filecaster",
|
||||||
"merge",
|
"merge",
|
||||||
"proc-macro-error2",
|
"proc-macro-error2",
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
"serde",
|
"serde",
|
||||||
|
"serde_json",
|
||||||
"syn",
|
"syn",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|||||||
@ -3,9 +3,11 @@ resolver = "2"
|
|||||||
members = ["filecaster", "filecaster-derive"]
|
members = ["filecaster", "filecaster-derive"]
|
||||||
|
|
||||||
[workspace.dependencies]
|
[workspace.dependencies]
|
||||||
|
filecaster-derive = { path = "filecaster-derive" }
|
||||||
serde = { version = "1.0", features = ["derive"] }
|
serde = { version = "1.0", features = ["derive"] }
|
||||||
merge = "0.2"
|
merge = "0.2"
|
||||||
# dev-dependencies
|
# dev-dependencies
|
||||||
|
filecaster = { path = "filecaster" }
|
||||||
claims = "0.8"
|
claims = "0.8"
|
||||||
serde_json = "1.0"
|
serde_json = "1.0"
|
||||||
tempfile = "3.10"
|
tempfile = "3.10"
|
||||||
|
|||||||
@ -1,7 +1,17 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "filecaster-derive"
|
name = "filecaster-derive"
|
||||||
version = "0.1.0"
|
version = "0.2.0"
|
||||||
edition = "2024"
|
edition = "2024"
|
||||||
|
authors = ["Kristofers Solo <dev@kristofers.xyz>"]
|
||||||
|
description = "Procedural derive macro for `filecaster`: automatically implement `FromFile` for your structs."
|
||||||
|
license = "MIT OR Apache-2.0"
|
||||||
|
repository = "https://github.com/kristoferssolo/filecaster"
|
||||||
|
homepage = "https://github.com/kristoferssolo/filecaster"
|
||||||
|
documentation = "https://docs.rs/filecaster-derive"
|
||||||
|
readme = "../README.md"
|
||||||
|
keywords = ["proc-macro", "derive", "configuration", "file-parsing"]
|
||||||
|
categories = ["rust-patterns", "parsing", "config"]
|
||||||
|
exclude = ["/.github", "/.gitignore", "/tests", "*.png", "*.md"]
|
||||||
|
|
||||||
[lib]
|
[lib]
|
||||||
proc-macro = true
|
proc-macro = true
|
||||||
@ -21,3 +31,5 @@ merge = { workspace = true, optional = true }
|
|||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
claims.workspace = true
|
claims.workspace = true
|
||||||
|
serde_json.workspace = true
|
||||||
|
filecaster.workspace = true
|
||||||
|
|||||||
@ -7,7 +7,7 @@ use syn::{
|
|||||||
|
|
||||||
const WITH_MERGE: bool = cfg!(feature = "merge");
|
const WITH_MERGE: bool = cfg!(feature = "merge");
|
||||||
|
|
||||||
/// Entry point: generate the shadow struct + [`FromFile`] impls.
|
/// Entry point: generate the shadow struct + `FromFile` impls.
|
||||||
pub fn impl_from_file(input: &DeriveInput) -> Result<TokenStream> {
|
pub fn impl_from_file(input: &DeriveInput) -> Result<TokenStream> {
|
||||||
let name = &input.ident;
|
let name = &input.ident;
|
||||||
let vis = &input.vis;
|
let vis = &input.vis;
|
||||||
|
|||||||
@ -1,17 +1,17 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "filecaster"
|
name = "filecaster"
|
||||||
version = "0.1.0"
|
version = "0.2.0"
|
||||||
edition = "2024"
|
edition = "2024"
|
||||||
authors = ["Kristofers Solo <dev@kristofers.xyz>"]
|
authors = ["Kristofers Solo <dev@kristofers.xyz>"]
|
||||||
description = "Procedural macro to derive configuration from files, with optional merging capabilities."
|
description = "Procedural macro to derive configuration from files, with optional merging capabilities."
|
||||||
repository = "https://github.com/kristoferssolo/filecaster"
|
|
||||||
documentation = "https://docs.rs/filecaster"
|
|
||||||
homepage = "https://github.com/kristoferssolo/filecaster"
|
|
||||||
license = "MIT OR Apache-2.0"
|
license = "MIT OR Apache-2.0"
|
||||||
keywords = ["proc-macro", "derive", "configuration", "file-parsing"]
|
repository = "https://github.com/kristoferssolo/filecaster"
|
||||||
|
homepage = "https://github.com/kristoferssolo/filecaster"
|
||||||
|
documentation = "https://docs.rs/filecaster"
|
||||||
|
readme = "../README.md"
|
||||||
|
keywords = ["configuration", "file-parsing"]
|
||||||
categories = ["rust-patterns", "parsing", "config"]
|
categories = ["rust-patterns", "parsing", "config"]
|
||||||
exclude = ["/.github", "/.gitignore", "/tests", "*.png", "*.md"]
|
exclude = ["/.github", "/.gitignore", "/tests", "*.png", "*.md"]
|
||||||
readme = "README.md"
|
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
default = ["serde", "derive"]
|
default = ["serde", "derive"]
|
||||||
@ -20,7 +20,7 @@ serde = ["dep:serde", "filecaster-derive/serde"]
|
|||||||
merge = ["dep:merge", "filecaster-derive/merge"]
|
merge = ["dep:merge", "filecaster-derive/merge"]
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
filecaster-derive = { path = "../filecaster-derive", optional = true }
|
filecaster-derive = { workspace = true, optional = true }
|
||||||
serde = { workspace = true, optional = true }
|
serde = { workspace = true, optional = true }
|
||||||
merge = { workspace = true, optional = true }
|
merge = { workspace = true, optional = true }
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user