schemurai 3.0.1 → 3.0.2
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.
- checksums.yaml +4 -4
- data/README.md +6 -4
- data/ext/schemurai_native/Cargo.lock +48 -1
- data/ext/schemurai_native/Cargo.toml +3 -1
- data/ext/schemurai_native/extconf.rb +1 -1
- data/ext/schemurai_native/glue.c +1679 -62
- data/ext/schemurai_native/protocol.def +45 -0
- data/ext/schemurai_native/src/budget.rs +49 -0
- data/ext/schemurai_native/src/container.rs +460 -0
- data/ext/schemurai_native/src/content.rs +56 -27
- data/ext/schemurai_native/src/diagnostics/array.rs +392 -0
- data/ext/schemurai_native/src/diagnostics/object.rs +218 -0
- data/ext/schemurai_native/src/diagnostics.rs +1087 -307
- data/ext/schemurai_native/src/enumeration.rs +6 -1
- data/ext/schemurai_native/src/evaluation.rs +49 -20
- data/ext/schemurai_native/src/format.rs +8 -6
- data/ext/schemurai_native/src/graph.rs +37 -0
- data/ext/schemurai_native/src/instance_graph.rs +90 -0
- data/ext/schemurai_native/src/lib.rs +910 -237
- data/ext/schemurai_native/src/memo.rs +11 -38
- data/ext/schemurai_native/src/number/arbitrary.rs +154 -0
- data/ext/schemurai_native/src/number.rs +250 -59
- data/ext/schemurai_native/src/pattern.rs +113 -101
- data/ext/schemurai_native/src/pointer.rs +97 -0
- data/ext/schemurai_native/src/runtime/properties.rs +162 -0
- data/ext/schemurai_native/src/runtime/reports.rs +266 -0
- data/ext/schemurai_native/src/runtime/scopes.rs +430 -0
- data/ext/schemurai_native/src/runtime.rs +1020 -0
- data/ext/schemurai_native/src/scope.rs +60 -16
- data/ext/schemurai_native/src/string.rs +68 -0
- data/ext/schemurai_native/src/tracking.rs +244 -174
- data/lib/schemurai/container_checks/array_diagnostics.rb +119 -0
- data/lib/schemurai/container_checks/object_diagnostics.rb +152 -0
- data/lib/schemurai/container_checks.rb +534 -0
- data/lib/schemurai/decimal.rb +11 -0
- data/lib/schemurai/dialect.rb +0 -12
- data/lib/schemurai/ecma_regexp.rb +46 -0
- data/lib/schemurai/evaluation_pool.rb +66 -0
- data/lib/schemurai/evaluator.rb +9 -48
- data/lib/schemurai/json_pointer.rb +11 -0
- data/lib/schemurai/native/diagnostics.rb +4 -3
- data/lib/schemurai/native/evaluator.rb +38 -10
- data/lib/schemurai/native/null_numeric.rb +23 -0
- data/lib/schemurai/number_checks.rb +128 -0
- data/lib/schemurai/string_checks.rb +166 -0
- data/lib/schemurai/type_checks.rb +59 -0
- data/lib/schemurai/value_equality.rb +72 -0
- data/lib/schemurai/version.rb +1 -1
- data/lib/schemurai/vm/compiler.rb +18 -26
- data/lib/schemurai/vm/evaluator.rb +87 -545
- data/lib/schemurai/vm/limited_evaluator.rb +7 -22
- metadata +24 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: dd0769d236e3a91c31ef4e701b642fbcaf76946cb23a11e0a03c230d0f5982d2
|
|
4
|
+
data.tar.gz: 7b05d25b9825801b5b79c7cdacf8c22bcdd3230dc81ef817e6098c140b1d4686
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 76972d14c8f9682d763e640879d6543effa89d53c6eb2e7b91bcf9cad955f5838e69260e5ec08791c27f582db3f7f90d54252d9c6f0c4f8db219a1ebac98ad67
|
|
7
|
+
data.tar.gz: fc443ff0789f2f8e3ad95a70f51fc831187da07287c2fafed49cb6fa6999bdb68a1978773de3783b01a217ec39ba482b91ad6cf6d4f4785ac0e13d14a9874731
|
data/README.md
CHANGED
|
@@ -189,7 +189,7 @@ must not be shared between threads or Ractors. With the VM and native backends,
|
|
|
189
189
|
the registry compiles and shares its bytecode before this transition. The native
|
|
190
190
|
backend also prepares shared native instruction tables for all four combinations
|
|
191
191
|
of `content` and `format`; `validator_for` does not recompile them in each Ractor.
|
|
192
|
-
Native regex search caches and
|
|
192
|
+
Native regex search caches and Ruby runtime helper state belong to each
|
|
193
193
|
validator. Preparing these tables adds time and memory to `make_shareable`.
|
|
194
194
|
|
|
195
195
|
### Meta-schema validation
|
|
@@ -255,13 +255,15 @@ applicator trials do not consume the cap. Boolean checks ignore the error cap
|
|
|
255
255
|
and use the ordinary evaluator when no timeout is set.
|
|
256
256
|
|
|
257
257
|
The timeout uses a monotonic elapsed-time deadline, including diagnostic
|
|
258
|
-
rendering and native
|
|
259
|
-
every 256 checkpoints in evaluation, container scans and
|
|
258
|
+
rendering and native runtime helper calls and retries. It checks at entry,
|
|
259
|
+
before returning and every 256 checkpoints in evaluation, container scans and
|
|
260
|
+
structural traversal.
|
|
260
261
|
Ruby string/content operations also check before and after expensive calls.
|
|
261
262
|
Zero seconds stops even a trivial call. Expiry raises `LimitExceeded` with
|
|
262
263
|
`limit == :timeout`; `maximum` and `attempted` are configured and elapsed seconds.
|
|
263
264
|
Native returns an exhaustion status and releases Rust resources before Ruby
|
|
264
|
-
raises. A limit hit is terminal
|
|
265
|
+
raises. A limit hit is terminal. Native validation does not fall back to VM
|
|
266
|
+
execution, with or without invocation limits.
|
|
265
267
|
|
|
266
268
|
This implementation never uses Ruby `Timeout`, timer threads, signals or
|
|
267
269
|
asynchronous exception injection. It is cooperative: one regexp search, scalar
|
|
@@ -11,6 +11,12 @@ dependencies = [
|
|
|
11
11
|
"memchr",
|
|
12
12
|
]
|
|
13
13
|
|
|
14
|
+
[[package]]
|
|
15
|
+
name = "autocfg"
|
|
16
|
+
version = "1.5.1"
|
|
17
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
18
|
+
checksum = "f2032f911046de80f0a198e0901378627c33f59ea0ac00e363d481118bd70a53"
|
|
19
|
+
|
|
14
20
|
[[package]]
|
|
15
21
|
name = "base64-simd"
|
|
16
22
|
version = "0.8.0"
|
|
@@ -51,6 +57,45 @@ version = "2.8.3"
|
|
|
51
57
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
52
58
|
checksum = "cf8baf1c55e62ffcace7a9f06f4bd9cd3f0c4beb022d3b367256b91b87513d98"
|
|
53
59
|
|
|
60
|
+
[[package]]
|
|
61
|
+
name = "num-bigint"
|
|
62
|
+
version = "0.4.8"
|
|
63
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
64
|
+
checksum = "c89e69e7e0f03bea5ef08013795c25018e101932225a656383bd384495ecc367"
|
|
65
|
+
dependencies = [
|
|
66
|
+
"num-integer",
|
|
67
|
+
"num-traits",
|
|
68
|
+
]
|
|
69
|
+
|
|
70
|
+
[[package]]
|
|
71
|
+
name = "num-integer"
|
|
72
|
+
version = "0.1.47"
|
|
73
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
74
|
+
checksum = "7ce2d95d4b3734dc35aa2f45e1aa22cd416814592a4f9d9205e11affd5b8e10b"
|
|
75
|
+
dependencies = [
|
|
76
|
+
"num-traits",
|
|
77
|
+
]
|
|
78
|
+
|
|
79
|
+
[[package]]
|
|
80
|
+
name = "num-rational"
|
|
81
|
+
version = "0.4.2"
|
|
82
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
83
|
+
checksum = "f83d14da390562dca69fc84082e73e548e1ad308d24accdedd2720017cb37824"
|
|
84
|
+
dependencies = [
|
|
85
|
+
"num-bigint",
|
|
86
|
+
"num-integer",
|
|
87
|
+
"num-traits",
|
|
88
|
+
]
|
|
89
|
+
|
|
90
|
+
[[package]]
|
|
91
|
+
name = "num-traits"
|
|
92
|
+
version = "0.2.19"
|
|
93
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
94
|
+
checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841"
|
|
95
|
+
dependencies = [
|
|
96
|
+
"autocfg",
|
|
97
|
+
]
|
|
98
|
+
|
|
54
99
|
[[package]]
|
|
55
100
|
name = "outref"
|
|
56
101
|
version = "0.5.2"
|
|
@@ -82,11 +127,13 @@ checksum = "9774ba4a74de5f7b1c1451ed6cd5285a32eddb5cccb8cc655a4e50009e06477f"
|
|
|
82
127
|
|
|
83
128
|
[[package]]
|
|
84
129
|
name = "schemurai-native"
|
|
85
|
-
version = "3.0.
|
|
130
|
+
version = "3.0.2"
|
|
86
131
|
dependencies = [
|
|
87
132
|
"base64-simd",
|
|
88
133
|
"base64-turbo",
|
|
89
134
|
"memchr",
|
|
135
|
+
"num-bigint",
|
|
136
|
+
"num-rational",
|
|
90
137
|
"regex-automata",
|
|
91
138
|
"regex-syntax",
|
|
92
139
|
"ryu",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[package]
|
|
2
2
|
name = "schemurai-native"
|
|
3
|
-
version = "3.0.
|
|
3
|
+
version = "3.0.2"
|
|
4
4
|
edition = "2024"
|
|
5
5
|
rust-version = "1.93"
|
|
6
6
|
publish = false
|
|
@@ -9,6 +9,8 @@ publish = false
|
|
|
9
9
|
base64-simd = "0.8.0"
|
|
10
10
|
base64-turbo = "0.5.0"
|
|
11
11
|
memchr = "2.8.3"
|
|
12
|
+
num-bigint = "0.4.8"
|
|
13
|
+
num-rational = "0.4.2"
|
|
12
14
|
regex-automata = "0.4.18"
|
|
13
15
|
regex-syntax = "0.8.11"
|
|
14
16
|
ryu = "1.0.23"
|
|
@@ -57,7 +57,7 @@ File.open("Makefile", "a") do |file|
|
|
|
57
57
|
|
|
58
58
|
glue.o: $(srcdir)/protocol.h $(srcdir)/protocol.def
|
|
59
59
|
|
|
60
|
-
$(srcdir)/target/release/libschemurai_native.a: $(srcdir)/Cargo.toml $(srcdir)/Cargo.lock $(srcdir)/build.rs $(srcdir)/protocol.def $(wildcard $(srcdir)/src/*.rs)
|
|
60
|
+
$(srcdir)/target/release/libschemurai_native.a: $(srcdir)/Cargo.toml $(srcdir)/Cargo.lock $(srcdir)/build.rs $(srcdir)/protocol.def $(wildcard $(srcdir)/src/*.rs $(srcdir)/src/*/*.rs)
|
|
61
61
|
\tcargo build --manifest-path $(srcdir)/Cargo.toml --release --locked
|
|
62
62
|
MAKE
|
|
63
63
|
end
|