dry-validation-rust 0.1.0.pre5-aarch64-linux → 0.1.0.pre6-aarch64-linux

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (45) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +13 -0
  3. data/.markdownlint.yml +9 -0
  4. data/.rubocop.yml +124 -0
  5. data/.ruby-version +1 -0
  6. data/.tool-versions +1 -0
  7. data/.yardopts +4 -0
  8. data/AGENTS.md +376 -0
  9. data/CHANGELOG.md +71 -0
  10. data/CODE_OF_CONDUCT.md +42 -0
  11. data/CONTRIBUTING.md +159 -0
  12. data/GOVERNANCE.md +68 -0
  13. data/Gemfile +15 -0
  14. data/Gemfile.lock +132 -0
  15. data/NOTICE.md +5 -5
  16. data/README.md +206 -181
  17. data/Rakefile +350 -0
  18. data/SECURITY.md +98 -0
  19. data/SECURITY_AUDIT.md +33 -0
  20. data/SUMMARY.md +30 -0
  21. data/SUPPORT.md +67 -0
  22. data/book.toml +9 -0
  23. data/codecov.yml +11 -0
  24. data/compatibility.yml +453 -0
  25. data/deny.toml +7 -0
  26. data/dry-validation-rust.gemspec +21 -23
  27. data/ext/dry_validation_rust/fuzz/.gitignore +5 -0
  28. data/ext/dry_validation_rust/fuzz/corpus/parse_plan/basic_params.json +1 -0
  29. data/lib/dry/validation/rust/native.so +0 -0
  30. data/lib/dry/validation/rust/path_trie.rb +15 -8
  31. data/lib/dry/validation/rust/schema/dsl.rb +8 -0
  32. data/lib/dry/validation/rust/schema/field_definition.rb +3 -1
  33. data/lib/dry/validation/rust/schema/predicate_block.rb +2 -1
  34. data/lib/dry/validation/rust/schema/ruby_type_processor.rb +38 -23
  35. data/lib/dry/validation/rust/version.rb +1 -1
  36. data/supply-chain/audits.toml +4 -0
  37. data/supply-chain/config.toml +368 -0
  38. data/supply-chain/imports.lock +4 -0
  39. data/support_matrix.yml +9 -0
  40. metadata +49 -21
  41. data/docs/ARCHITECTURE.md +0 -256
  42. data/docs/COMPATIBILITY.md +0 -198
  43. data/docs/FEASIBILITY.md +0 -207
  44. data/docs/SUPPORT_MATRIX.md +0 -66
  45. data/docs/VERIFICATION.md +0 -128
data/CONTRIBUTING.md ADDED
@@ -0,0 +1,159 @@
1
+ # Contributing to dry-validation-rust
2
+
3
+ Thank you for helping improve `dry-validation-rust`. This is a hybrid
4
+ Ruby/Rust native extension, so changes must preserve both Ruby-facing behavior
5
+ and the safety of the Rust FFI boundary.
6
+
7
+ Before starting substantial work, open an issue or comment on an existing one
8
+ so scope and compatibility expectations can be agreed. Keep pull requests
9
+ focused on one behavior, maintenance concern, or documentation change.
10
+ Roadmap priorities, milestone scope, label meanings, and project-board flow are
11
+ defined in [docs/PROJECT_MANAGEMENT.md](docs/PROJECT_MANAGEMENT.md).
12
+
13
+ ## Prerequisites
14
+
15
+ Use a Ruby, Rust toolchain, and platform listed in
16
+ [the support matrix](docs/SUPPORT_MATRIX.md). A source checkout currently
17
+ requires:
18
+
19
+ - CRuby 3.3 or newer with development headers;
20
+ - Rust 1.75 or newer and Cargo (the MSRV, tested in CI);
21
+ - Bundler;
22
+ - a C compiler and `make`;
23
+ - Clang/libclang when the selected `rb-sys` build requires bindgen.
24
+
25
+ The checkout pins Rust 1.75.0 in `rust-toolchain.toml`, so the documented
26
+ commands use the MSRV by default. Do not introduce code or dependencies that
27
+ require a newer Rust release unless the MSRV policy is intentionally updated.
28
+
29
+ On macOS, install the Xcode Command Line Tools and LLVM. On Debian/Ubuntu,
30
+ install a build toolchain plus `clang` and `libclang-dev`.
31
+
32
+ ## Clean-checkout setup
33
+
34
+ ```bash
35
+ git clone https://github.com/alex-tomilov/dry-validation-rust.git
36
+ cd dry-validation-rust
37
+ bundle install
38
+ bundle exec rake compile
39
+ script/verify
40
+ ```
41
+
42
+ `script/verify` is the canonical local gate. It compiles the native extension,
43
+ runs the Ruby and Rust tests, checks Rust formatting and Clippy warnings,
44
+ verifies the lockfile, builds the source gem, installs it into an isolated gem
45
+ home, and runs an installed-package smoke contract.
46
+
47
+ ## Test layers
48
+
49
+ Use the smallest relevant check while developing, then run `script/verify`
50
+ before requesting review.
51
+
52
+ ```bash
53
+ # Ruby integration suite
54
+ script/test
55
+
56
+ # One Ruby test file
57
+ bundle exec ruby -Itest test/schema_test.rb
58
+
59
+ # Rust unit tests and quality checks
60
+ cargo test --locked --manifest-path ext/dry_validation_rust/Cargo.toml
61
+ cargo fmt --check --manifest-path ext/dry_validation_rust/Cargo.toml
62
+ cargo clippy --manifest-path ext/dry_validation_rust/Cargo.toml \
63
+ --all-targets --all-features -- -D warnings
64
+
65
+ # Source-gem contents and clean-install smoke
66
+ bundle exec rake package:audit
67
+ ```
68
+
69
+ Rust code must be formatted with `rustfmt` and pass Clippy with warnings denied.
70
+ Consider installing a pre-commit hook so formatting issues are caught before
71
+ pushing:
72
+
73
+ ```bash
74
+ cargo install cargo-husky
75
+ ```
76
+
77
+ Code must compile on the Rust 1.75 MSRV; all CI workflows use and test that
78
+ exact toolchain.
79
+ Runtime and FFI code must not use `unwrap`, `expect`, broad `.ok()`, or
80
+ `unwrap_or(default)` unless the reason is narrow, documented, and reviewed.
81
+ No Rust panic may cross the Ruby FFI boundary.
82
+
83
+ ## Compatibility fixtures
84
+
85
+ The current baseline fixtures live in `test/fixtures/baseline` and are
86
+ exercised by `test/baseline_fixture_test.rb`.
87
+
88
+ When changing compatibility behavior:
89
+
90
+ 1. Add or update a narrowly named scenario in
91
+ `test/baseline_fixture_test.rb`.
92
+ 2. Add the expected normalized result under
93
+ `test/fixtures/baseline/<scenario>.json`.
94
+ 3. Cover valid and invalid input when both paths are relevant.
95
+ 4. Compare the same contract and input against the pinned
96
+ `dry-validation` and `dry-schema` versions from
97
+ `docs/SUPPORT_MATRIX.md`, in a separate process.
98
+ 5. Include both outputs, exceptions, and version details in the pull request.
99
+
100
+ The full differential harness is not implemented yet. Until it is, do not
101
+ describe a local baseline fixture as proof of upstream parity.
102
+
103
+ ## Changelog policy
104
+
105
+ Add an entry under `Unreleased` in `CHANGELOG.md` for user-visible behavior,
106
+ compatibility changes, packaging changes, security changes, or meaningful
107
+ documentation changes. Internal refactors that do not affect users generally
108
+ do not need an entry.
109
+
110
+ Do not rewrite released changelog sections except to correct a factual error.
111
+
112
+ ## Benchmark evidence
113
+
114
+ Performance claims require reproducible before/after evidence. Include:
115
+
116
+ - the exact benchmark script and revision;
117
+ - warmup and measured iteration counts;
118
+ - Ruby, Rust, dependency, OS, CPU, and memory details;
119
+ - throughput or latency plus RSS/allocations where relevant;
120
+ - raw results from multiple runs;
121
+ - compatibility checks proving semantics did not change.
122
+
123
+ `script/benchmark-smoke` is a non-gating sanity check, not evidence for a
124
+ public performance claim.
125
+
126
+ ## Pull requests
127
+
128
+ The repository currently uses `develop` as the active integration branch and
129
+ `main` as the default/release branch. Unless a maintainer requests otherwise,
130
+ open feature and maintenance pull requests against `develop`. Tested changes
131
+ are promoted to `main`; releases are tagged from `main`.
132
+
133
+ Pull requests should:
134
+
135
+ - link the implementation issue and milestone;
136
+ - explain the problem and the chosen design;
137
+ - identify public API and compatibility impact;
138
+ - include regression tests for behavior changes;
139
+ - remain small enough to review as one coherent change;
140
+ - update relevant documentation and the changelog;
141
+ - report exact verification commands and results;
142
+ - avoid drive-by formatting or unrelated refactoring.
143
+
144
+ Prefer squash merging for a focused pull request. Do not force-push after
145
+ review has started unless necessary to remove sensitive data or repair the
146
+ branch, and explain any rewritten history.
147
+
148
+ Do not commit generated native libraries, packaged `.gem` files, Cargo
149
+ `target` output, generated Makefiles, or other build artifacts. Release tooling
150
+ may generate binary artifacts in CI, but those artifacts belong in the release
151
+ pipeline rather than the source tree.
152
+
153
+ ## Contribution certification
154
+
155
+ The project does not require a Contributor License Agreement or mandatory
156
+ Developer Certificate of Origin sign-off at this stage. By contributing, you
157
+ confirm that you have the right to submit the work under the repository's MIT
158
+ license. A future certification change will be proposed publicly before it is
159
+ enforced.
data/GOVERNANCE.md ADDED
@@ -0,0 +1,68 @@
1
+ # Governance
2
+
3
+ ## Project status and maintainer
4
+
5
+ `dry-validation-rust` is an independent, single-maintainer project. Alexey
6
+ Tomilov is the current maintainer and has final responsibility for technical
7
+ direction, merges, releases, security advisories, and repository
8
+ administration.
9
+
10
+ This governance model describes the current project; it does not imply a
11
+ foundation, steering committee, or multi-maintainer organization.
12
+
13
+ ## Decision making
14
+
15
+ Routine changes are decided through issue and pull-request discussion. The
16
+ maintainer considers correctness, compatibility evidence, FFI safety,
17
+ maintenance cost, performance evidence, and alignment with the documented
18
+ product scope.
19
+
20
+ When consensus is not reached, the maintainer makes the final decision and
21
+ records material tradeoffs in the issue, pull request, architecture
22
+ documentation, or changelog as appropriate.
23
+
24
+ ## Compatibility philosophy
25
+
26
+ `Dry::Validation::Rust::Contract` is the primary supported API. Familiar
27
+ dry-validation-style behavior is supported only where it is documented and
28
+ tested against pinned upstream releases. Exact compatibility mode remains
29
+ experimental and process-isolated from upstream gems.
30
+
31
+ Unsupported behavior must fail loudly. Compatibility claims require executable
32
+ evidence; performance claims require reproducible measurements. The project
33
+ will not silently widen its supported DSL or weaken tests to hide a mismatch.
34
+
35
+ ## Breaking changes
36
+
37
+ Breaking changes should start with a public issue describing the affected
38
+ surface, migration path, compatibility evidence, and release impact. During
39
+ the alpha period, breaking changes may occur in prereleases, but they must be
40
+ intentional and documented.
41
+
42
+ Once a stable line exists, its deprecation and support policy will be defined
43
+ before release. This file does not create a stability promise beyond the
44
+ current support matrix.
45
+
46
+ ## Branches and releases
47
+
48
+ `main` is the default and release branch. `develop` is currently the active
49
+ integration branch, with short-lived feature branches merged through pull
50
+ requests. Tested changes are promoted from `develop` to `main`.
51
+
52
+ Only the maintainer may authorize a gem publication, release tag, GitHub
53
+ release, or security advisory. Passing CI does not itself authorize a release.
54
+
55
+ ## Adding maintainers
56
+
57
+ Additional maintainers may be invited after sustained, trustworthy
58
+ contributions across code review, compatibility work, security-sensitive
59
+ changes, documentation, and support. Access should be granted incrementally
60
+ and follow least privilege. Any change to release or security authority will
61
+ be documented publicly.
62
+
63
+ ## Relationship to dry-rb
64
+
65
+ This project is independent from dry-rb and its maintainers. It is not an
66
+ official dry-rb project, and its compatibility and support statements apply
67
+ only to `dry-validation-rust`. Upstream project names are used to describe the
68
+ API reference and comparison target.
data/Gemfile ADDED
@@ -0,0 +1,15 @@
1
+ # frozen_string_literal: true
2
+
3
+ source 'https://rubygems.org'
4
+ gemspec
5
+ gem 'benchmark', '>= 0.3', '< 1.0'
6
+ gem 'benchmark-ips', '~> 2.14'
7
+ gem 'bundler-audit', require: false
8
+ gem 'dry-validation', '1.11.1'
9
+ gem 'memory_profiler', '~> 1.1'
10
+ gem 'rubocop', '>= 1.88.2'
11
+ gem 'rubocop-minitest', require: false
12
+ gem 'rubocop-performance', require: false
13
+ gem 'simplecov', require: false, group: :test
14
+ gem 'simplecov-lcov', require: false, group: :test
15
+ gem 'yard', '~> 0.9', require: false
data/Gemfile.lock ADDED
@@ -0,0 +1,132 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ dry-validation-rust (0.1.0.pre6)
5
+ bigdecimal (>= 3.1, < 5.0)
6
+ rb_sys (>= 0.9.100, < 0.10)
7
+
8
+ GEM
9
+ remote: https://rubygems.org/
10
+ specs:
11
+ ast (2.4.3)
12
+ benchmark (0.5.0)
13
+ benchmark-ips (2.15.1)
14
+ bigdecimal (4.1.2)
15
+ bundler-audit (0.9.3)
16
+ bundler (>= 1.2.0)
17
+ thor (~> 1.0)
18
+ concurrent-ruby (1.3.7)
19
+ drb (2.2.3)
20
+ dry-configurable (1.4.0)
21
+ dry-core (~> 1.0)
22
+ zeitwerk (~> 2.6)
23
+ dry-core (1.2.0)
24
+ concurrent-ruby (~> 1.0)
25
+ logger
26
+ zeitwerk (~> 2.6)
27
+ dry-inflector (1.3.1)
28
+ dry-initializer (3.2.0)
29
+ dry-logic (1.6.0)
30
+ bigdecimal
31
+ concurrent-ruby (~> 1.0)
32
+ dry-core (~> 1.1)
33
+ zeitwerk (~> 2.6)
34
+ dry-schema (1.16.0)
35
+ concurrent-ruby (~> 1.0)
36
+ dry-configurable (~> 1.0, >= 1.0.1)
37
+ dry-core (~> 1.1)
38
+ dry-initializer (~> 3.2)
39
+ dry-logic (~> 1.6)
40
+ dry-types (~> 1.9, >= 1.9.1)
41
+ zeitwerk (~> 2.6)
42
+ dry-types (1.9.1)
43
+ bigdecimal (>= 3.0)
44
+ concurrent-ruby (~> 1.0)
45
+ dry-core (~> 1.0)
46
+ dry-inflector (~> 1.0)
47
+ dry-logic (~> 1.4)
48
+ zeitwerk (~> 2.6)
49
+ dry-validation (1.11.1)
50
+ concurrent-ruby (~> 1.0)
51
+ dry-core (~> 1.1)
52
+ dry-initializer (~> 3.2)
53
+ dry-schema (~> 1.14)
54
+ zeitwerk (~> 2.6)
55
+ json (2.21.2)
56
+ language_server-protocol (3.17.0.6)
57
+ lint_roller (1.1.0)
58
+ logger (1.7.0)
59
+ memory_profiler (1.1.0)
60
+ minitest (6.0.6)
61
+ drb (~> 2.0)
62
+ prism (~> 1.5)
63
+ parallel (2.1.0)
64
+ parser (3.3.12.0)
65
+ ast (~> 2.4.1)
66
+ racc
67
+ prism (1.9.0)
68
+ racc (1.8.1)
69
+ rainbow (3.1.1)
70
+ rake (13.4.2)
71
+ rake-compiler (1.3.1)
72
+ rake
73
+ rake-compiler-dock (1.12.0)
74
+ rb_sys (0.9.128)
75
+ rake-compiler-dock (= 1.12.0)
76
+ regexp_parser (2.12.0)
77
+ rubocop (1.89.0)
78
+ json (~> 2.3)
79
+ language_server-protocol (~> 3.17.0.2)
80
+ lint_roller (~> 1.1.0)
81
+ parallel (>= 1.10)
82
+ parser (>= 3.3.0.2)
83
+ rainbow (>= 2.2.2, < 4.0)
84
+ regexp_parser (>= 2.9.3, < 3.0)
85
+ rubocop-ast (>= 1.49.0, < 2.0)
86
+ ruby-progressbar (~> 1.7)
87
+ unicode-display_width (>= 2.4.0, < 4.0)
88
+ rubocop-ast (1.50.0)
89
+ parser (>= 3.3.7.2)
90
+ prism (~> 1.7)
91
+ rubocop-minitest (0.40.0)
92
+ lint_roller (~> 1.1)
93
+ rubocop (>= 1.75.0, < 2.0)
94
+ rubocop-ast (>= 1.38.0, < 2.0)
95
+ rubocop-performance (1.27.0)
96
+ lint_roller (~> 1.1)
97
+ rubocop (>= 1.89.0, < 2.0)
98
+ rubocop-ast (>= 1.47.1, < 2.0)
99
+ ruby-progressbar (1.13.0)
100
+ simplecov (1.1.1)
101
+ simplecov-lcov (0.9.0)
102
+ thor (1.5.0)
103
+ unicode-display_width (3.2.0)
104
+ unicode-emoji (~> 4.1)
105
+ unicode-emoji (4.2.0)
106
+ yard (0.9.45)
107
+ zeitwerk (2.8.2)
108
+
109
+ PLATFORMS
110
+ ruby
111
+ x86_64-linux
112
+
113
+ DEPENDENCIES
114
+ benchmark (>= 0.3, < 1.0)
115
+ benchmark-ips (~> 2.14)
116
+ bundler-audit
117
+ dry-validation (= 1.11.1)
118
+ dry-validation-rust!
119
+ memory_profiler (~> 1.1)
120
+ minitest (~> 6.0)
121
+ rake (~> 13.1)
122
+ rake-compiler (~> 1.3)
123
+ rake-compiler-dock (~> 1.12)
124
+ rubocop (>= 1.88.2)
125
+ rubocop-minitest
126
+ rubocop-performance
127
+ simplecov
128
+ simplecov-lcov
129
+ yard (~> 0.9)
130
+
131
+ BUNDLED WITH
132
+ 2.5.22
data/NOTICE.md CHANGED
@@ -8,11 +8,11 @@ The public interfaces, documentation, tests, dependency metadata, and
8
8
  architecture of these MIT-licensed projects were studied:
9
9
 
10
10
  - dry-validation, copyright 2015–2026 Hanakai team:
11
- https://github.com/dry-rb/dry-validation
11
+ <https://github.com/dry-rb/dry-validation>
12
12
  - dry-schema, copyright its contributors:
13
- https://github.com/dry-rb/dry-schema
13
+ <https://github.com/dry-rb/dry-schema>
14
14
  - dry-logic and dry-types:
15
- https://github.com/dry-rb
15
+ <https://github.com/dry-rb>
16
16
 
17
17
  No upstream implementation source is copied into this project. The compatible
18
18
  surface was independently implemented. If future development incorporates
@@ -21,8 +21,8 @@ must be preserved.
21
21
 
22
22
  The native extension uses:
23
23
 
24
- - Magnus (MIT): https://github.com/matsadler/magnus
25
- - rb-sys (MIT OR Apache-2.0): https://github.com/oxidize-rb/rb-sys
24
+ - Magnus (MIT): <https://github.com/matsadler/magnus>
25
+ - rb-sys (MIT OR Apache-2.0): <https://github.com/oxidize-rb/rb-sys>
26
26
  - serde and serde_json (MIT OR Apache-2.0)
27
27
 
28
28
  Their complete license texts are distributed by their respective packages.