Commit Graph

332 Commits

Author SHA1 Message Date
Tony Garnock-Jones 7c8a5c61ca foreach_embedded 2021-07-05 16:09:31 +02:00
Tony Garnock-Jones e9b5b3549c Convenience 2021-07-05 13:03:30 +02:00
Tony Garnock-Jones e30ade6ed3 Take more advantage of use std::io; and fix benches 2021-07-05 13:00:30 +02:00
Tony Garnock-Jones 7e76503779 Remove IOResult in favour of std::io::Result 2021-07-05 12:38:11 +02:00
Tony Garnock-Jones da08189dd4 Embedded-parameterised Writer 2021-07-05 12:34:29 +02:00
Tony Garnock-Jones 8f1a83e548 Avoidance of hardcoded use of IOValue in Embedded reading 2021-07-05 12:00:05 +02:00
Tony Garnock-Jones 41fe3c3440 A new approach to embedded-parameterised Reader 2021-07-04 17:16:13 +02:00
Tony Garnock-Jones 64ff818cd1 Fixes in handling of embeddeds 2021-07-03 23:11:41 +02:00
Tony Garnock-Jones 83d15a838e Remove mostly-useless Domain methods 2021-07-03 23:10:43 +02:00
Tony Garnock-Jones c04447d62a Fixes & tweaks wrt Domain/Embedded/Embeddable 2021-07-03 09:00:05 +02:00
Tony Garnock-Jones c7b252ca9d More TryFrom<&SignedInteger> implementations 2021-07-03 08:59:22 +02:00
Tony Garnock-Jones 6143ddc93d NestedValue new() method for easy wrapping 2021-07-03 08:59:03 +02:00
Tony Garnock-Jones c70035b044 Avoid name clash 2021-07-02 16:24:16 +02:00
Tony Garnock-Jones 297d1d39eb Domain -> Embedded/Embeddable 2021-07-02 08:00:37 +02:00
Tony Garnock-Jones 8b7baec26b PreDomain 2021-07-02 07:49:13 +02:00
Tony Garnock-Jones 23943f8b14 ModuleContextMode::TargetIOValue, ModuleContextMode::TargetAny 2021-07-02 07:48:52 +02:00
Tony Garnock-Jones 8cafcbcaf1 Bump rust versions for release 2021-06-30 16:19:27 +02:00
Tony Garnock-Jones 70990d2371 Better names for literal constants 2021-06-30 16:07:49 +02:00
Tony Garnock-Jones 7c4cf38110 snake_case for module names 2021-06-30 15:55:42 +02:00
Tony Garnock-Jones 569563a564 Better error handling; use domains correctly 2021-06-30 15:50:50 +02:00
Tony Garnock-Jones aea230b056 Switch back to parsing/unparsing from IOValue 2021-06-30 15:18:20 +02:00
Tony Garnock-Jones 00759673ce Arc at ref boundaries 2021-06-30 15:06:28 +02:00
Tony Garnock-Jones 5b9c4d29f6 impl Domain for Arc<D: Domain> 2021-06-30 15:05:57 +02:00
Tony Garnock-Jones 17d8d076ec make test target 2021-06-30 15:05:44 +02:00
Tony Garnock-Jones e882d5a4df Aftershocks of Float/Double changes 2021-06-30 10:14:29 +02:00
Tony Garnock-Jones fc8709706c Cleanups; make as_float etc return Float, add as_f32 etc 2021-06-30 10:10:38 +02:00
Tony Garnock-Jones 3156180601 IOValue -> _Any = ArcValue<_Ptr> 2021-06-30 09:53:32 +02:00
Tony Garnock-Jones f1d403a6a7 Fallible from_preserves 2021-06-30 09:52:16 +02:00
Tony Garnock-Jones d69787e5ee Module aliases and embedded pointer types 2021-06-29 23:19:22 +02:00
Tony Garnock-Jones c3bc678a46 Better compiler API 2021-06-29 22:32:35 +02:00
Tony Garnock-Jones dd9e190bed More metadata 2021-06-29 20:31:28 +02:00
Tony Garnock-Jones 01e8e2c279 Include both a path and a version 2021-06-29 20:30:21 +02:00
Tony Garnock-Jones e4392ea2d5 Bump rust preserves version 2021-06-29 20:27:11 +02:00
Tony Garnock-Jones aa1c983acc Unparsers 2021-06-29 16:54:29 +02:00
Tony Garnock-Jones 5c2d12971d Better idioms 2021-06-28 22:38:30 +02:00
Tony Garnock-Jones 9c4be54be1 Bootstrap Rust preserves-schema 2021-06-28 22:25:41 +02:00
Tony Garnock-Jones 7546ba29ad Avoid quite a bit of boxing 2021-06-28 17:26:41 +02:00
Tony Garnock-Jones c7dbbdc178 Small fixes 2021-06-28 17:08:44 +02:00
Tony Garnock-Jones 4144a90b9d Initial commit (several days' worth) 2021-06-28 16:35:45 +02:00
Tony Garnock-Jones e4a2503899 The Great Renaming: Pointer -> Embedded 2021-05-17 14:54:06 +02:00
Tony Garnock-Jones 825d208198 Introduce Cargo workspace in prep for schema 2021-04-19 22:28:59 +02:00
Tony Garnock-Jones e078a71b30 Bump version 2021-03-12 20:52:52 +01:00
Tony Garnock-Jones 2b9eddfc79 Rename value::value to value::repr, the final clippyism 2021-03-12 11:04:23 +01:00
Tony Garnock-Jones d811032ac7 Fix up almost all reported clippyisms 2021-03-12 10:59:28 +01:00
Tony Garnock-Jones 013c5f4dae Bump Rust version 2021-01-29 13:53:49 +01:00
Tony Garnock-Jones 6fd06cec98 Require that domain toing and froing be total 2021-01-29 13:42:17 +01:00
Tony Garnock-Jones 532e811894 Introduce pointers 2021-01-29 12:03:28 +01:00
Tony Garnock-Jones a1a604aee8 Update Rust implementation 2021-01-23 22:54:27 +01:00
Tony Garnock-Jones 8d3146cf30 Bump Rust version 2020-07-10 17:01:21 +02:00
Tony Garnock-Jones 7cc7bd783d Adjust internal trait API 2020-07-10 16:59:54 +02:00
Tony Garnock-Jones 9f83756931 Remove decoder/encoder; undoes performance regression 2020-07-08 15:44:06 +02:00
Tony Garnock-Jones 28101cc7d1 Refactor to extract packed format from general traits. Regression in encode performance? 2020-07-08 15:44:06 +02:00
Tony Garnock-Jones 95cdd84db4 Bump rust version 2020-06-17 13:43:11 +02:00
Tony Garnock-Jones 70a305458a Avoid some copying 2020-06-17 11:01:44 +02:00
Tony Garnock-Jones 24afca5d32 Avoid expensive setup 2020-06-17 11:01:31 +02:00
Tony Garnock-Jones b1c7fe8c04 Remove unnecessary Cow 2020-06-17 09:35:09 +02:00
Tony Garnock-Jones 046a2ad999 Better varint reader 2020-06-17 04:11:27 +02:00
Tony Garnock-Jones 6cfb474a6f Avoid running the slow benchmark tests during regular testing 2020-06-17 03:05:32 +02:00
Tony Garnock-Jones 89c3171758 Autodelete benches/testdata.bin 2020-06-17 02:42:44 +02:00
Tony Garnock-Jones fefa2af730 Bump rust version 2020-06-17 02:39:31 +02:00
Tony Garnock-Jones f2910eb8d0 Slim down the common case of no annotations 2020-06-17 02:39:01 +02:00
Tony Garnock-Jones 078e8dd4e8 Benchmark large collection of small items 2020-06-17 02:33:45 +02:00
Tony Garnock-Jones e4e6622074 Switch to iter_with_large_drop 2020-06-17 00:13:56 +02:00
Tony Garnock-Jones 21cc7595ae Benchmark various readers for decoding 2020-06-16 17:57:52 +02:00
Tony Garnock-Jones e01f960ddc Benchmarks and test factorization 2020-06-16 17:46:55 +02:00
Tony Garnock-Jones 275d9e73b1 Bump version 2020-06-15 16:04:41 +02:00
Tony Garnock-Jones bffbeb2f6e Smaller Record; also, use u128/i128 when possible 2020-06-15 16:03:19 +02:00
Tony Garnock-Jones 1f4adc5ba6 Oh cool, is_none() exists 2020-06-15 09:58:49 +02:00
Tony Garnock-Jones 83b7513fae Build all targets 2020-06-15 09:57:56 +02:00
Tony Garnock-Jones b9aba35d39 New release 2020-05-29 11:08:33 +02:00
Tony Garnock-Jones eb088aa491 Experimentation with extensibility, such as it is 2020-05-29 11:08:12 +02:00
Tony Garnock-Jones 22b76cb9b6 Consume all sequence items in direct deserialization, matching deserialization from a Value 2020-05-29 11:07:55 +02:00
Tony Garnock-Jones 65b5399dbe Make CompoundBody consumption past end idempotent 2020-05-29 10:58:40 +02:00
Tony Garnock-Jones d1a5389060 Allow f32 and f64 to deserialize into each other 2020-05-29 10:58:00 +02:00
Tony Garnock-Jones b5f4c3a498 Remove placeholders from spec and implementations 2/5
Enormous refactoring in Rust implementation. Direct deserialization.
Zero-copy deserialization in some cases. Much faster.
2020-05-28 23:23:19 +02:00
Tony Garnock-Jones dfc50fcaee Simplify code (and get back up to speed! ~150kHz) by insisting on IOValue for all codec operations 2020-05-26 11:01:33 +02:00
Tony Garnock-Jones c30154e0c8 Improve (!) safety at the expense of speed: 155kHz -> 115kHz :-/ 2020-05-26 09:08:17 +02:00
Tony Garnock-Jones b122d6e2e0 copy_via able to map domains 2020-05-25 20:11:54 +02:00
Tony Garnock-Jones 2d57d0001b Even more error cleanup 2020-05-25 16:21:18 +02:00
Tony Garnock-Jones 450b73a4d2 More error cleanup 2020-05-25 16:12:41 +02:00
Tony Garnock-Jones 3f5e431717 Clean up error situation 2020-05-25 15:40:01 +02:00
Tony Garnock-Jones 1011818be6 Split out general std::io::Error wrapper 2020-05-25 15:34:17 +02:00
Tony Garnock-Jones 94058b5ec2 Simplify again by moving away from excessive internal buffering 2020-05-25 15:29:54 +02:00
Tony Garnock-Jones f07d2e6a5d Simplify and speed up decoding 2020-05-25 15:00:58 +02:00
Tony Garnock-Jones 6ad1707870 First stab at factoring out Reader trait 2020-05-25 13:42:06 +02:00
Tony Garnock-Jones 92463c37d4 Less ownership in preserves::ser::Serializer 2020-05-24 21:17:41 +02:00
Tony Garnock-Jones fdae09b44c Tweak preserves::ser API 2020-05-24 14:40:36 +02:00
Tony Garnock-Jones 67bf47a5c9 Less safe but drastically more efficient raw-value (de)serialization 2020-05-24 13:47:42 +02:00
Tony Garnock-Jones bddb4331aa Direct serialization 2020-05-23 22:33:02 +02:00
Tony Garnock-Jones d29ec9ffc4 Avoid a few small allocations when decoding 2020-05-22 10:38:34 +02:00
Tony Garnock-Jones 316a772fec Change API: as_record() now takes Option<usize> 2020-05-18 16:42:59 +02:00
Tony Garnock-Jones 2a85e53acc Repair mistaken usage of String instead of Symbol 2020-05-18 16:42:34 +02:00
Tony Garnock-Jones af7c523513 Bump versions 2020-05-13 12:58:47 +02:00
Tony Garnock-Jones 8e0ab95d82 Autodetectability of binary vs text; documented test case schema a little 2020-05-13 12:56:13 +02:00
Tony Garnock-Jones 02c02b641f Bump rust version 2019-10-23 22:59:13 +01:00
Tony Garnock-Jones b1ca95c835 Customizable treatment of Domain during encoding 2019-10-23 22:58:36 +01:00
Tony Garnock-Jones 27fb961653 Allow embedding of domain-specific non-Preserves data within a Preserves Value 2019-10-22 22:36:01 +01:00
Tony Garnock-Jones 826fce6203 Bump rust version 2019-10-20 13:57:40 +01:00
Tony Garnock-Jones 91f48d08f9 Clip clip clip 2019-10-20 13:57:10 +01:00
Tony Garnock-Jones 488bfdc59c Fix clippyisms 2019-10-20 13:57:04 +01:00
Tony Garnock-Jones ccc3b5780b Bump rust version 2019-10-19 23:31:22 +01:00
Tony Garnock-Jones 6f03538956 Clippy told me not to implement Hash when deriving PartialEq. Fair enough 2019-10-19 23:31:00 +01:00
Tony Garnock-Jones 84f99fc471 New tests 2019-10-19 23:30:46 +01:00
Tony Garnock-Jones 4b957d8785 Advance index when reading multiple bytes as well as one at a time 2019-10-19 23:26:44 +01:00
Tony Garnock-Jones a00314d108 Refine error API 2019-10-15 20:44:19 +01:00
Tony Garnock-Jones 96679e8bf5 Bump Rust version to 0.2.0 2019-10-12 22:51:36 +01:00
Tony Garnock-Jones c95b000b7b annotations_mut, value_mut for PlainValue 2019-10-12 22:51:25 +01:00
Tony Garnock-Jones 9611c1f977 Delegate most numeric From implementations to the i128 one 2019-10-12 22:36:46 +01:00
Tony Garnock-Jones 623bbd0a71 annotations() returns slice rather than Vec ref 2019-10-12 22:36:18 +01:00
Tony Garnock-Jones 54d1e349b3 AValue -> PlainValue, RcValue and ArcValue 2019-10-12 21:54:20 +01:00
Tony Garnock-Jones f1b37ac9af First tentative step to allowing reuse of Value with direct containment, Rc and Arc 2019-10-12 15:40:35 +01:00
Tony Garnock-Jones da2a6d44d1 Bump patch version 2019-09-20 21:43:18 +01:00
Tony Garnock-Jones f081470b1e panic -> unreachable 2019-09-20 21:43:08 +01:00
Tony Garnock-Jones 72edd1327a From<value::decoder::Error> for std::io::Error 2019-09-20 21:42:45 +01:00
Tony Garnock-Jones 8cdd67f5ba Mutable Read in Decoder 2019-09-20 21:42:09 +01:00
Tony Garnock-Jones 898a5d680d Expose encoder::Error 2019-09-19 21:49:46 +01:00
Tony Garnock-Jones 63cd853ba1 Rc -> Box 2019-09-19 21:35:00 +01:00
Tony Garnock-Jones 116b37a24f Ahhh 2019-09-19 21:34:40 +01:00
Tony Garnock-Jones 9af8ca8e97 More metadata 2019-09-17 11:42:13 +01:00
Tony Garnock-Jones ef3b88147e Codec; implement Rust tests; samples.txt in quasi-canonical serialized order 2019-09-17 11:27:44 +01:00
Tony Garnock-Jones 199ce1fdba invert_map (for placeholder en/decode conversion) 2019-09-17 09:57:44 +01:00
Tony Garnock-Jones 6775868272 Better errors; Symbol wrapper; proper identifier decoding; Test case struct deserialization works 2019-09-17 09:43:03 +01:00
Tony Garnock-Jones a548485b2e Rust serde glue (wip) 2019-09-17 00:58:44 +01:00
Tony Garnock-Jones 2349e80b30 Rust Encoder 2019-09-15 16:16:17 +01:00
Tony Garnock-Jones bec3a10d64 Annotation skipping; text-syntax-like debug printing (plus pretty printing for free!!) 2019-09-15 12:25:23 +01:00
Tony Garnock-Jones 1be54a2b8f Beginnings of a Rust Preserves decoder 2019-09-09 22:08:26 +01:00
Tony Garnock-Jones d5cbe90235 Further steps toward learning enough Rust to produce an implementation 2019-09-09 14:46:53 +01:00
Tony Garnock-Jones 2b1e2f2fba TODO note re testing of NaNs 2019-07-10 21:52:29 -04:00
Tony Garnock-Jones 04868a2309 Be explicit about expected type 2019-07-04 05:47:32 -04:00
Tony Garnock-Jones eadd83d603 Some tests of IEEE754 totalOrder 2019-06-30 23:43:32 +01:00
Tony Garnock-Jones 52cd074767 Update .gitignores 2019-06-30 19:01:43 +01:00
Tony Garnock-Jones 6960046263 Beginnings of Rust implementation 2019-06-29 23:02:27 +01:00