refix 0.4.0__tar.gz → 0.6.0__tar.gz
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.
- {refix-0.4.0 → refix-0.6.0}/Cargo.lock +232 -7
- {refix-0.4.0 → refix-0.6.0}/Cargo.toml +8 -3
- {refix-0.4.0 → refix-0.6.0}/PKG-INFO +3 -2
- {refix-0.4.0 → refix-0.6.0}/README.md +2 -1
- {refix-0.4.0 → refix-0.6.0}/crates/refix-message/CHANGELOG.md +26 -0
- {refix-0.4.0 → refix-0.6.0}/crates/refix-message/Cargo.toml +9 -1
- {refix-0.4.0 → refix-0.6.0}/crates/refix-message/README.md +10 -2
- refix-0.6.0/crates/refix-message/src/dialect.rs +24 -0
- refix-0.6.0/crates/refix-message/src/interop/bigdecimal.rs +102 -0
- refix-0.6.0/crates/refix-message/src/interop/chrono.rs +201 -0
- refix-0.6.0/crates/refix-message/src/interop/jiff.rs +192 -0
- refix-0.6.0/crates/refix-message/src/interop/rust_decimal.rs +103 -0
- refix-0.6.0/crates/refix-message/src/interop/time.rs +189 -0
- refix-0.6.0/crates/refix-message/src/interop.rs +25 -0
- {refix-0.4.0 → refix-0.6.0}/crates/refix-message/src/lib.rs +6 -1
- {refix-0.4.0 → refix-0.6.0}/crates/refix-message/src/message.rs +198 -1
- {refix-0.4.0 → refix-0.6.0}/crates/refix-message/src/stream.rs +7 -6
- {refix-0.4.0 → refix-0.6.0}/crates/refix-message/src/tokenizer.rs +11 -15
- refix-0.6.0/crates/refix-message/src/value/date.rs +284 -0
- {refix-0.4.0 → refix-0.6.0}/crates/refix-message/src/value/error.rs +12 -0
- refix-0.6.0/crates/refix-message/src/value/month_year.rs +199 -0
- refix-0.6.0/crates/refix-message/src/value/time.rs +253 -0
- refix-0.6.0/crates/refix-message/src/value/time_precision.rs +63 -0
- refix-0.6.0/crates/refix-message/src/value/utc_timestamp.rs +262 -0
- refix-0.6.0/crates/refix-message/src/value.rs +23 -0
- {refix-0.4.0 → refix-0.6.0}/python/refix/__init__.py +8 -1
- {refix-0.4.0 → refix-0.6.0}/python/refix/_core.pyi +21 -2
- refix-0.6.0/python/refix/codec.py +12 -0
- refix-0.6.0/python/refix/log.py +44 -0
- refix-0.6.0/python/refix/values.py +11 -0
- {refix-0.4.0 → refix-0.6.0}/python/refix-engine/CHANGELOG.md +21 -0
- {refix-0.4.0 → refix-0.6.0}/python/refix-engine/Cargo.toml +1 -1
- {refix-0.4.0 → refix-0.6.0}/python/refix-engine/README.md +2 -1
- refix-0.6.0/python/refix-engine/src/dialect.rs +25 -0
- {refix-0.4.0 → refix-0.6.0}/python/refix-engine/src/lib.rs +2 -0
- {refix-0.4.0 → refix-0.6.0}/python/refix-engine/src/message.rs +176 -1
- {refix-0.4.0 → refix-0.6.0}/python/refix-engine/src/stream.rs +8 -6
- {refix-0.4.0 → refix-0.6.0}/python/refix-engine/src/tokenizer.rs +9 -7
- {refix-0.4.0 → refix-0.6.0}/python/refix-engine/tests/test_benchmarks.py +40 -0
- {refix-0.4.0 → refix-0.6.0}/python/refix-engine/tests/test_groups.py +73 -0
- {refix-0.4.0 → refix-0.6.0}/python/refix-engine/tests/test_log.py +34 -2
- refix-0.6.0/python/refix-engine/tests/test_raw_message.py +312 -0
- {refix-0.4.0 → refix-0.6.0}/python/refix-engine/tests/test_stream.py +1 -1
- {refix-0.4.0 → refix-0.6.0}/python/refix-engine/tests/test_tokenizer.py +4 -2
- {refix-0.4.0 → refix-0.6.0}/python/refix-engine/tests/test_toy_generated.py +85 -6
- refix-0.6.0/python/refix-engine/tests/test_values.py +17 -0
- {refix-0.4.0 → refix-0.6.0}/python/refix-engine/tests/toy_generated.py +58 -7
- refix-0.4.0/crates/refix-message/src/value.rs +0 -5
- refix-0.4.0/python/refix/log.py +0 -34
- refix-0.4.0/python/refix-engine/tests/test_raw_message.py +0 -112
- {refix-0.4.0 → refix-0.6.0}/LICENSE-APACHE +0 -0
- {refix-0.4.0 → refix-0.6.0}/LICENSE-MIT +0 -0
- {refix-0.4.0 → refix-0.6.0}/crates/refix-message/LICENSE-APACHE +0 -0
- {refix-0.4.0 → refix-0.6.0}/crates/refix-message/LICENSE-MIT +0 -0
- {refix-0.4.0 → refix-0.6.0}/crates/refix-message/src/framing.rs +0 -0
- {refix-0.4.0 → refix-0.6.0}/crates/refix-message/src/group/error.rs +0 -0
- {refix-0.4.0 → refix-0.6.0}/crates/refix-message/src/group.rs +0 -0
- {refix-0.4.0 → refix-0.6.0}/crates/refix-message/src/length_tags.rs +0 -0
- {refix-0.4.0 → refix-0.6.0}/crates/refix-message/src/multiple_values.rs +0 -0
- {refix-0.4.0 → refix-0.6.0}/crates/refix-message/src/tag.rs +0 -0
- {refix-0.4.0 → refix-0.6.0}/crates/refix-message/src/test_utils.rs +0 -0
- {refix-0.4.0 → refix-0.6.0}/crates/refix-message/src/value/decimal.rs +0 -0
- {refix-0.4.0 → refix-0.6.0}/pyproject.toml +0 -0
- {refix-0.4.0 → refix-0.6.0}/python/refix/enums.py +0 -0
- {refix-0.4.0 → refix-0.6.0}/python/refix/errors.py +0 -0
- {refix-0.4.0 → refix-0.6.0}/python/refix/py.typed +0 -0
- {refix-0.4.0 → refix-0.6.0}/python/refix-engine/.python-version +0 -0
- {refix-0.4.0 → refix-0.6.0}/python/refix-engine/LICENSE-APACHE +0 -0
- {refix-0.4.0 → refix-0.6.0}/python/refix-engine/LICENSE-MIT +0 -0
- {refix-0.4.0 → refix-0.6.0}/python/refix-engine/src/group.rs +0 -0
- {refix-0.4.0 → refix-0.6.0}/python/refix-engine/tests/test_enums.py +0 -0
- {refix-0.4.0 → refix-0.6.0}/python/refix-engine/uv.lock +0 -0
|
@@ -52,12 +52,52 @@ dependencies = [
|
|
|
52
52
|
"windows-sys",
|
|
53
53
|
]
|
|
54
54
|
|
|
55
|
+
[[package]]
|
|
56
|
+
name = "arrayvec"
|
|
57
|
+
version = "0.7.8"
|
|
58
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
59
|
+
checksum = "d3fb67a6e08acf24fdeccbac2cb6ac4305825bd1f117462e0e6f2f193345ad56"
|
|
60
|
+
|
|
61
|
+
[[package]]
|
|
62
|
+
name = "autocfg"
|
|
63
|
+
version = "1.5.1"
|
|
64
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
65
|
+
checksum = "f2032f911046de80f0a198e0901378627c33f59ea0ac00e363d481118bd70a53"
|
|
66
|
+
|
|
67
|
+
[[package]]
|
|
68
|
+
name = "bigdecimal"
|
|
69
|
+
version = "0.4.11"
|
|
70
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
71
|
+
checksum = "8fa3f3d8cbf4dffcfe4991de61d012bef509a409ecbe9dd41049bfe32b4d4653"
|
|
72
|
+
dependencies = [
|
|
73
|
+
"autocfg",
|
|
74
|
+
"libm",
|
|
75
|
+
"num-bigint",
|
|
76
|
+
"num-integer",
|
|
77
|
+
"num-traits",
|
|
78
|
+
]
|
|
79
|
+
|
|
80
|
+
[[package]]
|
|
81
|
+
name = "bitflags"
|
|
82
|
+
version = "1.3.2"
|
|
83
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
84
|
+
checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a"
|
|
85
|
+
|
|
55
86
|
[[package]]
|
|
56
87
|
name = "bytes"
|
|
57
88
|
version = "1.12.1"
|
|
58
89
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
59
90
|
checksum = "fc652a48c352aef3ea3aed32080501cf3ef6ed5da78602a020c991775b0aff04"
|
|
60
91
|
|
|
92
|
+
[[package]]
|
|
93
|
+
name = "chrono"
|
|
94
|
+
version = "0.4.45"
|
|
95
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
96
|
+
checksum = "1aa79e62e7697b8e29b513a68abacf485adcd1fe8284a4316c5ae868e6633327"
|
|
97
|
+
dependencies = [
|
|
98
|
+
"num-traits",
|
|
99
|
+
]
|
|
100
|
+
|
|
61
101
|
[[package]]
|
|
62
102
|
name = "clap"
|
|
63
103
|
version = "4.6.5"
|
|
@@ -104,6 +144,43 @@ version = "1.0.5"
|
|
|
104
144
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
105
145
|
checksum = "1d07550c9036bf2ae0c684c4297d503f838287c83c53686d05370d0e139ae570"
|
|
106
146
|
|
|
147
|
+
[[package]]
|
|
148
|
+
name = "defmt"
|
|
149
|
+
version = "1.2.0"
|
|
150
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
151
|
+
checksum = "e4a0795ac740cb54d7b3775c9c17345f6aaecf884c01733b39d6017738e0e3e1"
|
|
152
|
+
dependencies = [
|
|
153
|
+
"bitflags",
|
|
154
|
+
"defmt-macros",
|
|
155
|
+
]
|
|
156
|
+
|
|
157
|
+
[[package]]
|
|
158
|
+
name = "defmt-macros"
|
|
159
|
+
version = "1.2.0"
|
|
160
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
161
|
+
checksum = "840bb056bd99c495c9188198a258ab787c79f306d864db3e6e8451442d6d8366"
|
|
162
|
+
dependencies = [
|
|
163
|
+
"defmt-parser",
|
|
164
|
+
"proc-macro2",
|
|
165
|
+
"quote",
|
|
166
|
+
"syn 3.0.3",
|
|
167
|
+
]
|
|
168
|
+
|
|
169
|
+
[[package]]
|
|
170
|
+
name = "defmt-parser"
|
|
171
|
+
version = "1.1.0"
|
|
172
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
173
|
+
checksum = "71958f69fb2de856c5dd51ac9377e986ca1aa5919f931bf5395a807277f889a0"
|
|
174
|
+
dependencies = [
|
|
175
|
+
"thiserror",
|
|
176
|
+
]
|
|
177
|
+
|
|
178
|
+
[[package]]
|
|
179
|
+
name = "deranged"
|
|
180
|
+
version = "0.5.9"
|
|
181
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
182
|
+
checksum = "9e9de72ce2ad1f90dc62fa25f0f430ef85eb4b0d8fa0be4f30373bc40a21d28e"
|
|
183
|
+
|
|
107
184
|
[[package]]
|
|
108
185
|
name = "heck"
|
|
109
186
|
version = "0.5.0"
|
|
@@ -116,18 +193,98 @@ version = "1.70.2"
|
|
|
116
193
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
117
194
|
checksum = "a6cb138bb79a146c1bd460005623e142ef0181e3d0219cb493e02f7d08a35695"
|
|
118
195
|
|
|
196
|
+
[[package]]
|
|
197
|
+
name = "jiff"
|
|
198
|
+
version = "0.2.38"
|
|
199
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
200
|
+
checksum = "b2b005715dcbeb0089a3c0dab99f2ff1cc3b2525323552703d648585d342a383"
|
|
201
|
+
dependencies = [
|
|
202
|
+
"jiff-core",
|
|
203
|
+
"jiff-static",
|
|
204
|
+
"portable-atomic",
|
|
205
|
+
"portable-atomic-util",
|
|
206
|
+
]
|
|
207
|
+
|
|
208
|
+
[[package]]
|
|
209
|
+
name = "jiff-core"
|
|
210
|
+
version = "0.1.1"
|
|
211
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
212
|
+
checksum = "5e52fe76043ccecc9005d2305ebaadf7d7fc0cc89ca6baa10a94d6bc68c7128c"
|
|
213
|
+
dependencies = [
|
|
214
|
+
"defmt",
|
|
215
|
+
"log",
|
|
216
|
+
]
|
|
217
|
+
|
|
218
|
+
[[package]]
|
|
219
|
+
name = "jiff-static"
|
|
220
|
+
version = "0.2.38"
|
|
221
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
222
|
+
checksum = "2cc9817253cf7c7ee4684451bd327e88d6f3658014e54a29198625590650695c"
|
|
223
|
+
dependencies = [
|
|
224
|
+
"jiff-core",
|
|
225
|
+
"proc-macro2",
|
|
226
|
+
"quote",
|
|
227
|
+
"syn 2.0.119",
|
|
228
|
+
]
|
|
229
|
+
|
|
119
230
|
[[package]]
|
|
120
231
|
name = "libc"
|
|
121
232
|
version = "0.2.189"
|
|
122
233
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
123
234
|
checksum = "3eaf3ede3fee6db1a4c2ee091bf8a8b4dccdc6d17f656fb07896ee72867612f2"
|
|
124
235
|
|
|
236
|
+
[[package]]
|
|
237
|
+
name = "libm"
|
|
238
|
+
version = "0.2.16"
|
|
239
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
240
|
+
checksum = "b6d2cec3eae94f9f509c767b45932f1ada8350c4bdb85af2fcab4a3c14807981"
|
|
241
|
+
|
|
242
|
+
[[package]]
|
|
243
|
+
name = "log"
|
|
244
|
+
version = "0.4.35"
|
|
245
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
246
|
+
checksum = "5d15f86d12da44cd8d4ec3c73984537eb7f4cadcb9776a575a0a8a05ca11005c"
|
|
247
|
+
|
|
125
248
|
[[package]]
|
|
126
249
|
name = "memchr"
|
|
127
250
|
version = "2.8.3"
|
|
128
251
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
129
252
|
checksum = "cf8baf1c55e62ffcace7a9f06f4bd9cd3f0c4beb022d3b367256b91b87513d98"
|
|
130
253
|
|
|
254
|
+
[[package]]
|
|
255
|
+
name = "num-bigint"
|
|
256
|
+
version = "0.4.8"
|
|
257
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
258
|
+
checksum = "c89e69e7e0f03bea5ef08013795c25018e101932225a656383bd384495ecc367"
|
|
259
|
+
dependencies = [
|
|
260
|
+
"num-integer",
|
|
261
|
+
"num-traits",
|
|
262
|
+
]
|
|
263
|
+
|
|
264
|
+
[[package]]
|
|
265
|
+
name = "num-conv"
|
|
266
|
+
version = "0.2.2"
|
|
267
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
268
|
+
checksum = "521739c6d2bac4aa25192232afe6841231376b2b26d4d9fae5ecf8ca5772e441"
|
|
269
|
+
|
|
270
|
+
[[package]]
|
|
271
|
+
name = "num-integer"
|
|
272
|
+
version = "0.1.47"
|
|
273
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
274
|
+
checksum = "7ce2d95d4b3734dc35aa2f45e1aa22cd416814592a4f9d9205e11affd5b8e10b"
|
|
275
|
+
dependencies = [
|
|
276
|
+
"num-traits",
|
|
277
|
+
]
|
|
278
|
+
|
|
279
|
+
[[package]]
|
|
280
|
+
name = "num-traits"
|
|
281
|
+
version = "0.2.19"
|
|
282
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
283
|
+
checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841"
|
|
284
|
+
dependencies = [
|
|
285
|
+
"autocfg",
|
|
286
|
+
]
|
|
287
|
+
|
|
131
288
|
[[package]]
|
|
132
289
|
name = "once_cell"
|
|
133
290
|
version = "1.21.4"
|
|
@@ -146,6 +303,21 @@ version = "1.14.0"
|
|
|
146
303
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
147
304
|
checksum = "3d20d5497ef88037a52ff98267d066e7f11fcc5e99bbfbd58a42336193aacec3"
|
|
148
305
|
|
|
306
|
+
[[package]]
|
|
307
|
+
name = "portable-atomic-util"
|
|
308
|
+
version = "0.2.8"
|
|
309
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
310
|
+
checksum = "10ab3eb7f3becc3a1cbc4f2c6f20267996cfc1a6467a873763411b136a122715"
|
|
311
|
+
dependencies = [
|
|
312
|
+
"portable-atomic",
|
|
313
|
+
]
|
|
314
|
+
|
|
315
|
+
[[package]]
|
|
316
|
+
name = "powerfmt"
|
|
317
|
+
version = "0.2.1"
|
|
318
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
319
|
+
checksum = "4a6394b9e965e73d0a289ee54f589087e2c676aedf60885baf52c76b771e4958"
|
|
320
|
+
|
|
149
321
|
[[package]]
|
|
150
322
|
name = "proc-macro2"
|
|
151
323
|
version = "1.0.107"
|
|
@@ -223,14 +395,14 @@ dependencies = [
|
|
|
223
395
|
|
|
224
396
|
[[package]]
|
|
225
397
|
name = "refix"
|
|
226
|
-
version = "0.
|
|
398
|
+
version = "0.2.0"
|
|
227
399
|
dependencies = [
|
|
228
400
|
"refix-message",
|
|
229
401
|
]
|
|
230
402
|
|
|
231
403
|
[[package]]
|
|
232
404
|
name = "refix-cli"
|
|
233
|
-
version = "0.
|
|
405
|
+
version = "0.2.0"
|
|
234
406
|
dependencies = [
|
|
235
407
|
"clap",
|
|
236
408
|
"refix-codegen",
|
|
@@ -239,7 +411,7 @@ dependencies = [
|
|
|
239
411
|
|
|
240
412
|
[[package]]
|
|
241
413
|
name = "refix-codegen"
|
|
242
|
-
version = "0.
|
|
414
|
+
version = "0.3.0"
|
|
243
415
|
dependencies = [
|
|
244
416
|
"bytes",
|
|
245
417
|
"refix-dictionary",
|
|
@@ -248,7 +420,7 @@ dependencies = [
|
|
|
248
420
|
|
|
249
421
|
[[package]]
|
|
250
422
|
name = "refix-dictionary"
|
|
251
|
-
version = "0.
|
|
423
|
+
version = "0.3.0"
|
|
252
424
|
dependencies = [
|
|
253
425
|
"refix-message",
|
|
254
426
|
"roxmltree",
|
|
@@ -256,7 +428,7 @@ dependencies = [
|
|
|
256
428
|
|
|
257
429
|
[[package]]
|
|
258
430
|
name = "refix-engine"
|
|
259
|
-
version = "0.
|
|
431
|
+
version = "0.6.0"
|
|
260
432
|
dependencies = [
|
|
261
433
|
"bytes",
|
|
262
434
|
"pyo3",
|
|
@@ -265,7 +437,7 @@ dependencies = [
|
|
|
265
437
|
|
|
266
438
|
[[package]]
|
|
267
439
|
name = "refix-fix44"
|
|
268
|
-
version = "0.
|
|
440
|
+
version = "0.5.0"
|
|
269
441
|
dependencies = [
|
|
270
442
|
"bytes",
|
|
271
443
|
"refix-message",
|
|
@@ -273,9 +445,14 @@ dependencies = [
|
|
|
273
445
|
|
|
274
446
|
[[package]]
|
|
275
447
|
name = "refix-message"
|
|
276
|
-
version = "0.
|
|
448
|
+
version = "0.4.0"
|
|
277
449
|
dependencies = [
|
|
450
|
+
"bigdecimal",
|
|
278
451
|
"bytes",
|
|
452
|
+
"chrono",
|
|
453
|
+
"jiff",
|
|
454
|
+
"rust_decimal",
|
|
455
|
+
"time",
|
|
279
456
|
]
|
|
280
457
|
|
|
281
458
|
[[package]]
|
|
@@ -287,6 +464,16 @@ dependencies = [
|
|
|
287
464
|
"memchr",
|
|
288
465
|
]
|
|
289
466
|
|
|
467
|
+
[[package]]
|
|
468
|
+
name = "rust_decimal"
|
|
469
|
+
version = "1.43.0"
|
|
470
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
471
|
+
checksum = "7653272e75dcac41dc199fbea6f5797633994fafd339943c06c9af16bf29cd3a"
|
|
472
|
+
dependencies = [
|
|
473
|
+
"arrayvec",
|
|
474
|
+
"num-traits",
|
|
475
|
+
]
|
|
476
|
+
|
|
290
477
|
[[package]]
|
|
291
478
|
name = "strsim"
|
|
292
479
|
version = "0.11.1"
|
|
@@ -321,6 +508,44 @@ version = "0.13.5"
|
|
|
321
508
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
322
509
|
checksum = "adb6935a6f5c20170eeceb1a3835a49e12e19d792f6dd344ccc76a985ca5a6ca"
|
|
323
510
|
|
|
511
|
+
[[package]]
|
|
512
|
+
name = "thiserror"
|
|
513
|
+
version = "2.0.21"
|
|
514
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
515
|
+
checksum = "09e52cb86a36cede5cb101bf8908837b3e4c6e5e59fe7fd85c23fb56200d189e"
|
|
516
|
+
dependencies = [
|
|
517
|
+
"thiserror-impl",
|
|
518
|
+
]
|
|
519
|
+
|
|
520
|
+
[[package]]
|
|
521
|
+
name = "thiserror-impl"
|
|
522
|
+
version = "2.0.21"
|
|
523
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
524
|
+
checksum = "fe5197923287db20a58125f0bc85c062f7f2c892de97b18c356f9efb14b28524"
|
|
525
|
+
dependencies = [
|
|
526
|
+
"proc-macro2",
|
|
527
|
+
"quote",
|
|
528
|
+
"syn 3.0.3",
|
|
529
|
+
]
|
|
530
|
+
|
|
531
|
+
[[package]]
|
|
532
|
+
name = "time"
|
|
533
|
+
version = "0.3.55"
|
|
534
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
535
|
+
checksum = "cdb87b95ec50ddfa440816d227a17b2ccbdda963a316a727fda0fc4334f7d134"
|
|
536
|
+
dependencies = [
|
|
537
|
+
"deranged",
|
|
538
|
+
"num-conv",
|
|
539
|
+
"powerfmt",
|
|
540
|
+
"time-core",
|
|
541
|
+
]
|
|
542
|
+
|
|
543
|
+
[[package]]
|
|
544
|
+
name = "time-core"
|
|
545
|
+
version = "0.1.9"
|
|
546
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
547
|
+
checksum = "9e1c906769ad99c88eaa54e728060edef082f8e358ff32030cb7c7d315e81109"
|
|
548
|
+
|
|
324
549
|
[[package]]
|
|
325
550
|
name = "unicode-ident"
|
|
326
551
|
version = "1.0.24"
|
|
@@ -13,12 +13,17 @@ keywords = ["fix", "fix-protocol", "fix-engine", "trading", "finance"]
|
|
|
13
13
|
categories = ["encoding", "parsing", "finance"]
|
|
14
14
|
|
|
15
15
|
[workspace.dependencies]
|
|
16
|
+
bigdecimal-04 = { package = "bigdecimal", version = "0.4.7", default-features = false }
|
|
16
17
|
bytes = "1.12.1"
|
|
18
|
+
chrono-04 = { package = "chrono", version = "0.4.35", default-features = false }
|
|
17
19
|
clap = { version = "4.6.5", features = ["derive"] }
|
|
20
|
+
jiff-02 = { package = "jiff", version = "0.2.0", default-features = false }
|
|
18
21
|
pyo3 = "0.29.0"
|
|
19
22
|
# Major and minor only, so a patch release doesn't re-release dependents.
|
|
20
|
-
refix-codegen = { version = "0.
|
|
21
|
-
refix-dictionary = { version = "0.
|
|
22
|
-
refix-message = { version = "0.
|
|
23
|
+
refix-codegen = { version = "0.3", path = "crates/refix-codegen" }
|
|
24
|
+
refix-dictionary = { version = "0.3", path = "crates/refix-dictionary" }
|
|
25
|
+
refix-message = { version = "0.4", path = "crates/refix-message" }
|
|
23
26
|
roxmltree = "0.21.0"
|
|
27
|
+
rust_decimal-1 = { package = "rust_decimal", version = "1.13.0", default-features = false }
|
|
24
28
|
serde = "1.0.229"
|
|
29
|
+
time-03 = { package = "time", version = "0.3.38", default-features = false }
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: refix
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.6.0
|
|
4
4
|
Classifier: Development Status :: 2 - Pre-Alpha
|
|
5
5
|
Classifier: Intended Audience :: Financial and Insurance Industry
|
|
6
6
|
Classifier: Programming Language :: Python :: 3
|
|
@@ -37,7 +37,8 @@ Anything between frames that isn't FIX comes back as `refix.Garble`.
|
|
|
37
37
|
`refix.Tokenizer` reads a single frame, and `refix.MessageStream` reads frames as bytes arrive.
|
|
38
38
|
|
|
39
39
|
Typed messages come from generated code: `refix-fix44` for FIX 4.4, or
|
|
40
|
-
`refix-cli` for your own dictionary.
|
|
40
|
+
`refix-cli` for your own dictionary. `refix.decode_log` reads a log as typed
|
|
41
|
+
messages through the generated module's `CODEC`.
|
|
41
42
|
|
|
42
43
|
Up to 0.2, this package was published as `refix-engine`. Uninstall that before installing `refix`, as both
|
|
43
44
|
provide the same module.
|
|
@@ -19,7 +19,8 @@ Anything between frames that isn't FIX comes back as `refix.Garble`.
|
|
|
19
19
|
`refix.Tokenizer` reads a single frame, and `refix.MessageStream` reads frames as bytes arrive.
|
|
20
20
|
|
|
21
21
|
Typed messages come from generated code: `refix-fix44` for FIX 4.4, or
|
|
22
|
-
`refix-cli` for your own dictionary.
|
|
22
|
+
`refix-cli` for your own dictionary. `refix.decode_log` reads a log as typed
|
|
23
|
+
messages through the generated module's `CODEC`.
|
|
23
24
|
|
|
24
25
|
Up to 0.2, this package was published as `refix-engine`. Uninstall that before installing `refix`, as both
|
|
25
26
|
provide the same module.
|
|
@@ -7,6 +7,32 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [0.4.0](https://github.com/refixhq/refix/compare/refix-message-v0.3.4...refix-message-v0.4.0) - 2026-11-02
|
|
11
|
+
|
|
12
|
+
### Added
|
|
13
|
+
|
|
14
|
+
- [**breaking**] take a dialect in place of extra length tags ([#120](https://github.com/refixhq/refix/pull/120))
|
|
15
|
+
|
|
16
|
+
## [0.3.4](https://github.com/refixhq/refix/compare/refix-message-v0.3.3...refix-message-v0.3.4) - 2026-11-01
|
|
17
|
+
|
|
18
|
+
### Added
|
|
19
|
+
|
|
20
|
+
- convert decimals to and from bigdecimal ([#114](https://github.com/refixhq/refix/pull/114))
|
|
21
|
+
- convert decimals to and from rust_decimal ([#113](https://github.com/refixhq/refix/pull/113))
|
|
22
|
+
- convert dates, times and timestamps to and from time ([#112](https://github.com/refixhq/refix/pull/112))
|
|
23
|
+
- convert dates, times and timestamps to and from chrono ([#111](https://github.com/refixhq/refix/pull/111))
|
|
24
|
+
- convert dates, times and timestamps to and from jiff ([#110](https://github.com/refixhq/refix/pull/110))
|
|
25
|
+
- split timestamps into dates and times ([#102](https://github.com/refixhq/refix/pull/102))
|
|
26
|
+
- read FIX MonthYear fields ([#100](https://github.com/refixhq/refix/pull/100))
|
|
27
|
+
- read FIX booleans ([#99](https://github.com/refixhq/refix/pull/99))
|
|
28
|
+
- read FIX times ([#98](https://github.com/refixhq/refix/pull/98))
|
|
29
|
+
- read FIX dates ([#97](https://github.com/refixhq/refix/pull/97))
|
|
30
|
+
- read FIX timestamps ([#96](https://github.com/refixhq/refix/pull/96))
|
|
31
|
+
|
|
32
|
+
### Fixed
|
|
33
|
+
|
|
34
|
+
- declare the minimum versions of the conversion crates ([#115](https://github.com/refixhq/refix/pull/115))
|
|
35
|
+
|
|
10
36
|
## [0.3.3](https://github.com/refixhq/refix/compare/refix-message-v0.3.2...refix-message-v0.3.3) - 2026-10-17
|
|
11
37
|
|
|
12
38
|
### Added
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
[package]
|
|
2
2
|
name = "refix-message"
|
|
3
3
|
description = "Framing, tokenisation and raw message representation for the ReFIX engine"
|
|
4
|
-
version = "0.
|
|
4
|
+
version = "0.4.0"
|
|
5
5
|
authors.workspace = true
|
|
6
6
|
edition.workspace = true
|
|
7
7
|
license.workspace = true
|
|
@@ -12,4 +12,12 @@ keywords.workspace = true
|
|
|
12
12
|
categories.workspace = true
|
|
13
13
|
|
|
14
14
|
[dependencies]
|
|
15
|
+
bigdecimal-04 = { workspace = true, optional = true }
|
|
15
16
|
bytes = { workspace = true }
|
|
17
|
+
chrono-04 = { workspace = true, optional = true }
|
|
18
|
+
jiff-02 = { workspace = true, optional = true }
|
|
19
|
+
rust_decimal-1 = { workspace = true, optional = true }
|
|
20
|
+
time-03 = { workspace = true, optional = true }
|
|
21
|
+
|
|
22
|
+
[package.metadata.docs.rs]
|
|
23
|
+
all-features = true
|
|
@@ -7,11 +7,11 @@ fields and reads them on demand, without copying.
|
|
|
7
7
|
|
|
8
8
|
```rust
|
|
9
9
|
use refix_message::stream::Outcome;
|
|
10
|
-
use refix_message::{MessageStream, Tag
|
|
10
|
+
use refix_message::{MessageStream, Tag};
|
|
11
11
|
|
|
12
12
|
fn main() {
|
|
13
13
|
let log = b"2026-10-10 09:30:00 IN 8=FIX.4.4\x019=5\x0135=0\x0110=163\x01\n";
|
|
14
|
-
let mut stream = MessageStream::
|
|
14
|
+
let mut stream = MessageStream::default();
|
|
15
15
|
stream.feed(log);
|
|
16
16
|
loop {
|
|
17
17
|
match stream.next_message() {
|
|
@@ -26,6 +26,14 @@ fn main() {
|
|
|
26
26
|
`Tokenizer::tokenize` reads a single frame. Typed messages are generated on top of it: `refix-fix44` for FIX 4.4, or
|
|
27
27
|
`refix-cli` for your own dictionary.
|
|
28
28
|
|
|
29
|
+
## Features
|
|
30
|
+
|
|
31
|
+
- `bigdecimal-04` converts `Decimal` to and from bigdecimal 0.4.
|
|
32
|
+
- `chrono-04` converts `Date`, `Time` and `UtcTimestamp` to and from chrono 0.4.
|
|
33
|
+
- `jiff-02` converts `Date`, `Time` and `UtcTimestamp` to and from jiff 0.2.
|
|
34
|
+
- `rust_decimal-1` converts `Decimal` to and from rust_decimal 1.
|
|
35
|
+
- `time-03` converts `Date`, `Time` and `UtcTimestamp` to and from time 0.3.
|
|
36
|
+
|
|
29
37
|
## License
|
|
30
38
|
|
|
31
39
|
Licensed under either of Apache License, Version 2.0 or MIT license at your option.
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
use crate::Tag;
|
|
2
|
+
|
|
3
|
+
/// How a counterparty's FIX differs from the standard.
|
|
4
|
+
#[derive(Clone, Copy, Debug, Default)]
|
|
5
|
+
pub struct Dialect<'a> {
|
|
6
|
+
pub(crate) extra_length_tags: &'a [Tag],
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
impl<'a> Dialect<'a> {
|
|
10
|
+
/// Standard FIX.
|
|
11
|
+
pub const fn new() -> Self {
|
|
12
|
+
Self {
|
|
13
|
+
extra_length_tags: &[],
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
/// Length tags beyond the standard set, each giving the byte count of the
|
|
18
|
+
/// data field after it.
|
|
19
|
+
pub const fn with_extra_length_tags(self, tags: &'a [Tag]) -> Self {
|
|
20
|
+
Self {
|
|
21
|
+
extra_length_tags: tags,
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
}
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
use crate::{Decimal, OutOfRange};
|
|
2
|
+
use bigdecimal_04::BigDecimal;
|
|
3
|
+
use bigdecimal_04::num_bigint::BigInt;
|
|
4
|
+
|
|
5
|
+
impl From<Decimal> for BigDecimal {
|
|
6
|
+
fn from(decimal: Decimal) -> Self {
|
|
7
|
+
BigDecimal::new(
|
|
8
|
+
BigInt::from(decimal.mantissa()),
|
|
9
|
+
-i64::from(decimal.exponent()),
|
|
10
|
+
)
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
impl TryFrom<&BigDecimal> for Decimal {
|
|
15
|
+
type Error = OutOfRange;
|
|
16
|
+
|
|
17
|
+
/// Fails when the digits don't fit an `i64` or the scale an `i8`, so round first.
|
|
18
|
+
fn try_from(decimal: &BigDecimal) -> Result<Self, Self::Error> {
|
|
19
|
+
let (digits, scale) = decimal.as_bigint_and_scale();
|
|
20
|
+
let mantissa = i64::try_from(digits.as_ref()).map_err(|_| OutOfRange)?;
|
|
21
|
+
let exponent = scale
|
|
22
|
+
.checked_neg()
|
|
23
|
+
.and_then(|exponent| i8::try_from(exponent).ok())
|
|
24
|
+
.ok_or(OutOfRange)?;
|
|
25
|
+
Ok(Decimal::new(mantissa, exponent))
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
impl TryFrom<BigDecimal> for Decimal {
|
|
30
|
+
type Error = OutOfRange;
|
|
31
|
+
|
|
32
|
+
/// Fails when the digits don't fit an `i64` or the scale an `i8`, so round first.
|
|
33
|
+
fn try_from(decimal: BigDecimal) -> Result<Self, Self::Error> {
|
|
34
|
+
Decimal::try_from(&decimal)
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
#[cfg(test)]
|
|
39
|
+
mod tests {
|
|
40
|
+
use super::*;
|
|
41
|
+
|
|
42
|
+
fn big_decimal(digits: impl Into<BigInt>, scale: i64) -> BigDecimal {
|
|
43
|
+
BigDecimal::new(digits.into(), scale)
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
fn to_big_decimal(mantissa: i64, exponent: i8) -> (BigInt, i64) {
|
|
47
|
+
BigDecimal::from(Decimal::new(mantissa, exponent)).into_bigint_and_scale()
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
fn from_big_decimal(decimal: BigDecimal) -> (i64, i8) {
|
|
51
|
+
let converted = Decimal::try_from(decimal).unwrap();
|
|
52
|
+
(converted.mantissa(), converted.exponent())
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
#[test]
|
|
56
|
+
fn converts_to_bigdecimal_keeping_the_scale() {
|
|
57
|
+
assert_eq!(to_big_decimal(10125, -2), (BigInt::from(10125), 2));
|
|
58
|
+
assert_eq!(to_big_decimal(150, -2), (BigInt::from(150), 2));
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
#[test]
|
|
62
|
+
fn converts_from_bigdecimal_keeping_the_scale() {
|
|
63
|
+
assert_eq!(from_big_decimal(big_decimal(10125, 2)), (10125, -2));
|
|
64
|
+
assert_eq!(from_big_decimal(big_decimal(150, 2)), (150, -2));
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
#[test]
|
|
68
|
+
fn keeps_a_positive_exponent_as_a_negative_scale() {
|
|
69
|
+
assert_eq!(to_big_decimal(5, 3), (BigInt::from(5), -3));
|
|
70
|
+
assert_eq!(from_big_decimal(big_decimal(5, -3)), (5, 3));
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
#[test]
|
|
74
|
+
fn round_trips_the_ends_of_an_i64_and_an_i8() {
|
|
75
|
+
for (mantissa, exponent) in [(i64::MIN, i8::MIN), (i64::MAX, i8::MAX)] {
|
|
76
|
+
let converted = BigDecimal::from(Decimal::new(mantissa, exponent));
|
|
77
|
+
assert_eq!(from_big_decimal(converted), (mantissa, exponent));
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
#[test]
|
|
82
|
+
fn converts_a_borrowed_bigdecimal() {
|
|
83
|
+
let decimal = big_decimal(10125, 2);
|
|
84
|
+
assert_eq!(Decimal::try_from(&decimal), Ok(Decimal::new(10125, -2)));
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
#[test]
|
|
88
|
+
fn rejects_digits_beyond_an_i64() {
|
|
89
|
+
let past_the_end = big_decimal(BigInt::from(i64::MAX) + 1, 0);
|
|
90
|
+
let third = BigDecimal::from(1) / BigDecimal::from(3);
|
|
91
|
+
for decimal in [past_the_end, third] {
|
|
92
|
+
assert_eq!(Decimal::try_from(decimal), Err(OutOfRange));
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
#[test]
|
|
97
|
+
fn rejects_a_scale_beyond_an_i8() {
|
|
98
|
+
for scale in [129, -128, i64::MIN, i64::MAX] {
|
|
99
|
+
assert_eq!(Decimal::try_from(big_decimal(1, scale)), Err(OutOfRange));
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
}
|