Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
0648749
feat(cli): add ConfigSource trait, ConfigBuilder, and priority merging
chikof Apr 20, 2025
8ca75be
fix(cli): correct ClapSource initialization and proc-macro CLI integr…
chikof Apr 20, 2025
170265c
refactor: config parsing and enhance type support
chikof Apr 20, 2025
282edfa
Merge remote-tracking branch 'origin' into feat/cli-config-sources
chikof Apr 21, 2025
b11a3a8
fix: i got confused while mergin
chikof Apr 21, 2025
2ff5c5c
refactor: re-organize macro parameters
chikof May 15, 2025
d4186ae
feat: replace clap with custom source
chikof May 15, 2025
ba729dd
feat: just a few tests
chikof May 20, 2025
30b5583
feat: separate parsers by features & improve tests
chikof Jul 2, 2025
a21d165
chore: codecov files
chikof Jul 2, 2025
590b2a8
feat: tests toml parser functionality
chikof Jul 2, 2025
3c8013b
feat: testing parsers values
chikof Jul 2, 2025
5eb9ecf
feat: testing json and yml parsing
chikof Jul 5, 2025
6a39038
feat: testing files to have the right file extension
chikof Jul 6, 2025
9fd3271
feat: testing merging config sections
chikof Jul 6, 2025
50d7c21
feat: test macro parameters
chikof Jul 6, 2025
2c02c97
feat: arg override support
chikof Jul 7, 2025
f0baf04
feat: test for invalid file formats
chikof Jul 7, 2025
69f2d4f
feat: test field params
chikof Jul 7, 2025
836322f
chore: remove extra comment and leave a compile_error in a imposible …
chikof Jul 7, 2025
d49389f
fix: codecov upload error
chikof Jul 7, 2025
460d16e
feat: improve documentation and remove unused source
chikof Jul 10, 2025
4a72f41
ci: try cargo-nextest for testing
chikof Jul 10, 2025
68c3e82
fix: missing_file test case for windows
chikof Jul 10, 2025
583387e
chore: github metadata
chikof Jul 10, 2025
bd063df
chore: shhh
chikof Jul 10, 2025
c1118e7
ci: publish to crates.io workflow
chikof Jul 10, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 48 additions & 0 deletions .github/ISSUE_TEMPLATE/BUG_REPORT.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Bug Report
description: Report unexpected behavior or crashes
title: "[BUG] "
labels: ["bug-report", "triage"]
body:
- type: checkboxes
attributes:
label: Pre-submission Checklist
options:
- label: I've checked existing issues and pull requests
required: true
- label: I've read the [Code of Conduct](https://github.com/FlakySL/cruct/blob/main/CODE_OF_CONDUCT.md)
required: true
- label: Are you using the latest version of cruct?
required: true

- type: dropdown
attributes:
label: Component
options:
- Core library
- Documentation
validations:
required: true

- type: input
attributes:
label: Rust Version
placeholder: Output of `rustc --version`
validations:
required: true

- type: textarea
attributes:
label: Reproduction Steps
description: Step-by-step instructions to reproduce the issue
validations:
required: true

- type: textarea
attributes:
label: Expected vs Actual Behavior
description: What you expected to happen vs what actually happened

- type: textarea
attributes:
label: Additional Context
description: Logs, screenshots, or code samples
37 changes: 37 additions & 0 deletions .github/ISSUE_TEMPLATE/FEATURE_REQUEST.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Feature Request
description: Suggest an idea for cruct
title: "[FEATURE] "
labels: ["feature-request", "triage"]
body:
- type: checkboxes
attributes:
label: Pre-submission Checklist
options:
- label: I've checked existing issues and pull requests
required: true
- label: I've read the [Code of Conduct](https://github.com/FlakySL/cruct/blob/main/CODE_OF_CONDUCT.md)
required: true

- type: textarea
attributes:
label: Problem Description
description: What problem are you trying to solve?
validations:
required: true

- type: textarea
attributes:
label: Proposed Solution
description: How should cruct address this problem?
validations:
required: true

- type: textarea
attributes:
label: Alternatives Considered
description: Other ways this could potentially be solved

- type: textarea
attributes:
label: Additional Context
description: Potential disadvantages, edge cases, or examples
26 changes: 26 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
blank_issues_enabled: false

contact_links:
- name: "💬 Community Help (Discord)"
url: https://discord.gg/AJWFyps23a
about: |
For general questions, discussion, or brainstorming:
- Get real-time help from maintainers
- Discuss potential features
- Chat with other contributors
*Please check existing issues first!*

- name: "⚖️ Code of Conduct"
url: https://github.com/FlakySL/cruct/blob/main/CODE_OF_CONDUCT.md
about: |
All community interactions must follow the project
code of conduct, which is based on the contributor covenant.
*Required reading before participating*

- name: "🚨 Moderation Contact"
url: mailto:[email protected]
about: |
For urgent moderation issues:
- Code of Conduct violations
- Community safety concerns
- Escalation requests
Binary file added .github/cruct_banner.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
version: 2
updates:
- package-ecosystem: "cargo"
directory: "/"
schedule:
interval: "weekly"
14 changes: 14 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
## Pre-submission Checklist

- [ ] I've checked existing issues and pull requests
- [ ] I've read the [Code of Conduct](../CODE_OF_CONDUCT.md)
- [ ] I've [implemented tests](../TESTING.md) for my changes
- [ ] I've listed all my changes in the `Changes` section

## Changes

-

## Linked Issues

- fixes #<issue_number>
52 changes: 52 additions & 0 deletions .github/workflows/overall-coverage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: tests

on:
push:
branches: [main]
pull_request:
branches:
- main

jobs:
coverage:
name: Collect test coverage
runs-on: ${{ matrix.os }}
strategy:
matrix:
os:
- ubuntu-latest
- windows-latest
# nightly rust might break from time to time
continue-on-error: true
env:
RUSTFLAGS: -D warnings
CARGO_TERM_COLOR: always
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
# Nightly Rust is used for cargo llvm-cov --doc below.
- uses: dtolnay/rust-toolchain@nightly
with:
components: llvm-tools-preview
- uses: Swatinem/rust-cache@98c8021b550208e191a6a3145459bfc9fb29c4c0 # v2

- name: Install latest nextest release
uses: taiki-e/install-action@d028bcc176afad59ee1e0b7dbba9789b8a1421f8 # v2
with:
tool: nextest
- name: Install cargo-llvm-cov
uses: taiki-e/install-action@d028bcc176afad59ee1e0b7dbba9789b8a1421f8 # v2
with:
tool: cargo-llvm-cov

- name: Collect coverage data
# Generate separate reports for nextest and doctests, and combine them.
run: |
cargo llvm-cov --no-report nextest
cargo llvm-cov --no-report --doc
cargo llvm-cov report --doctests --lcov --output-path lcov.info
- name: Upload coverage data to codecov
uses: codecov/codecov-action@18283e04ce6e62d37312384ff67231eb8fd56d24 # v5
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
with:
files: lcov.info
Empty file added .github/workflows/publish.yml
Empty file.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
target/
.bacon-locations
.direnv
.direnv/
76 changes: 76 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
# cruct Code of Conduct

## Our Pledge

In the interest of fostering an open and welcoming environment, we as
contributors and maintainers pledge to making participation in our project and
our community a harassment-free experience for everyone, regardless of age, body
size, disability, ethnicity, gender identity and expression, level of experience,
education, socio-economic status, nationality, personal appearance, race,
religion, or sexual identity and orientation.

## Our Standards

Examples of behavior that contributes to creating a positive environment
include:

* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members

Examples of unacceptable behavior by participants include:

* The use of sexualized language or imagery and unwelcome sexual attention or
advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic
address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting

## Our Responsibilities

Project maintainers are responsible for clarifying the standards of acceptable
behavior and are expected to take appropriate and fair corrective action in
response to any instances of unacceptable behavior.

Project maintainers have the right and responsibility to remove, edit, or
reject comments, commits, code, wiki edits, issues, and other contributions
that are not aligned to this Code of Conduct, or to ban temporarily or
permanently any contributor for other behaviors that they deem inappropriate,
threatening, offensive, or harmful.

## Scope

This Code of Conduct applies both within project spaces and in public spaces
when an individual is representing the project or its community. Examples of
representing a project or community include using an official project e-mail
address, posting via an official social media account, or acting as an appointed
representative at an online or offline event. Representation of a project may be
further defined and clarified by project maintainers.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting the project team at [`[email protected]`].
All complaints will be reviewed and investigated and will result in a response that
is deemed necessary and appropriate to the circumstances. The project team is
obligated to maintain confidentiality with regard to the reporter of an incident.
Further details of specific enforcement policies may be posted separately.

Project maintainers who do not follow or enforce the Code of Conduct in good
faith may face temporary or permanent repercussions as determined by other
members of the project's leadership.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage],
version 1.4, available at [contributor covenant].

[homepage]: https://www.contributor-covenant.org
[contributor covenant]: https://www.contributor-covenant.org/version/1/4/code-of-conduct.html

[`[email protected]`]: mailto:[email protected]
65 changes: 65 additions & 0 deletions CONTIRBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
# Contributing to cruct

In cruct, we welcome contributions from everyone, including bug reports,
pull requests, and feedback. This document serves as guidance if you are
considering submitting any of the above.

## Submitting Bug Reports and Feature Requests

To submit a bug report or feature request, you can open an issue in this
repository: [`FlakySL/cruct`].

When reporting a bug or requesting help, please include sufficient details
to allow others to reproduce the behavior you're encountering. For guidance on
how to approach this, read about [How to Create a Minimal, Reproducible Example].

When making a feature request, please clearly explain:

1. The problem you want to solve
2. How cruct could help address this problem
3. Any potential alternatives
4. Possible disadvantages of your proposal

Before submitting, please verify that no existing issue addresses your specific
problem/request. If you want to elaborate on a problem or discuss it further,
you can use our [Discord channel] at Flaky.

We recommend using the issue templates provided in this repository.

## Making Pull Requests

Before adding a feature on your behalf, we'd rather for it to be evaluated
in a issue before, we appreciate the time and effort our contributors have
and we don't want to waste it, so we'd rather talk about your feature before
you working on it.

When submitting a pull request make sure the code you added is tested and
documented, if it isn't you will be asked to document/test it before merging.

To add tests please refer to the [testing documentation] in the root folder.

## Running Tests and Compiling the Project

This project doesn't have any specific configuration
to it, meaning you can simply use `cargo build` to compile
the project and `cargo test` to test it.

The makefile in the project is used only in the workflow
runs and provides coverage for `codecov` and other statistics.

## Code of Conduct

The Flaky community follows the [Contributor covenant].
For moderation issues or escalation, please contact Esteve or Luis at
[[email protected]] rather than the Rust
moderation team.

[testing documentation]: ./TESTING.md
[Contributor covenant]: ./CODE_OF_CONDUCT.md

[`FlakySL/cruct`]: https://github.com/FlakySL/cruct

[Discord channel]: https://discord.gg/AJWFyps23a
[[email protected]]: mailto:[email protected]

[How to Create a Minimal, Reproducible Example]: https://stackoverflow.com/help/minimal-reproducible-example
Loading