7a53d9f | Peter Duchovni | 11 October 2021, 15:52:04 UTC | rustgen: autoformat | 11 October 2021, 15:52:04 UTC |
6425e93 | Peter Duchovni | 11 October 2021, 15:51:21 UTC | rustgen: add boolean targets in rustmain Adds bool-based codec targets to rust_main.ml Adds thusly-generated boolean codec .rs files | 11 October 2021, 15:51:21 UTC |
934ccb5 | Peter Duchovni | 11 October 2021, 15:43:10 UTC | rustgen: fix bool sanity check Corrects no-longer-true assertion that `bool` is not supported, by adding `verify` cases for `bool` and removing the `falsify` case in sanity.ml. | 11 October 2021, 15:43:10 UTC |
444fe4e | Peter Duchovni | 11 October 2021, 15:36:59 UTC | rustgen: autoformat | 11 October 2021, 15:36:59 UTC |
cf3e0f0 | Peter Duchovni | 11 October 2021, 15:27:34 UTC | rustgen: add bool scaffolding Adds scaffolding for boolean codecs in: - Simplified.Base_type.t - Rust.Ast.Type.Prim (new) - Rust.Generator Tests do not currently target boolean codecs but should be able to immediately. Introduces separation layer between Rust.Ast.Type.t and the set of primitive types, in the form of the novel Type.Prim submodule, containing Integral (U8/I8 currently) and Boolean. TODO: str? TODO: redesign generator.ml to reduce the overhead of per-base_type boilerplate per added constructor. | 11 October 2021, 15:27:34 UTC |
01e6775 | Peter Duchovni | 11 October 2021, 14:33:47 UTC | rustgen: embed base_type in submodule Introduces a layer of separation between the definition of base_type (`simplified.ml`) to allow for base_type-related functions to be grouped more appropriately: - Adds a `Base_type` submodule under which the `base_type` definition is moved and renamed as `t` - Adds a scaffolding alias `base_type = Base_type.t` - Adds an equality operator `Simplified.Base_type.(=)` that handles the base_type pattern-enumeration logic formerly inlined for Simplified.(=~) Refactors Simplified.(=~) to delegate the Base|Base case logic to Base_type.(=) Fixes qualification issue in sanity.ml, introduced by the above changes, by adding a local open `let open Simplified.Base_type` in `test_simplified_of_encoding` to allow the Base_type.t constructors to be referenced unqualified in case they ever move again. | 11 October 2021, 14:35:14 UTC |
96fa839 | Peter Duchovni | 08 October 2021, 23:12:46 UTC | rustgen: adds support for int8 Adds interop, AST, generator support for Int8 codecs Extends test cases and sample rust targets to include int8-based versions of the uint8 codecs already being generated. Replaces clunky u8->i8 conversion with `as` in rust_runtime | 08 October 2021, 23:12:46 UTC |
8fae355 | Peter Duchovni | 08 October 2021, 22:52:31 UTC | rustgen: add preliminary i8 support Adds get_int8 method for ByteParser, Decode/Encode implementations for i8, unit tests for i8 and u8 Encode/Decode | 08 October 2021, 22:52:31 UTC |
3cd6d70 | Peter Duchovni | 08 October 2021, 21:59:58 UTC | rustgen: fix pathing logic in test Replaces hardcoded directory-ascent pattern in codec_generator/test/rust_main.ml with actual current-working-directory aware ascent to the closest ancestor directory named 'data-encoding'. | 08 October 2021, 21:59:58 UTC |
bff5673 | Peter Duchovni | 08 October 2021, 19:28:15 UTC | Merge branch 'scaffolding' into 'tcc-rust' rustgen: extend type model in Rust AST and refactor the Rust runtime library API See merge request archaephyrryx/data-encoding!1 | 08 October 2021, 19:28:15 UTC |
d3582a7 | Peter Duchovni | 20 September 2021, 22:05:06 UTC | rustgen: refactor kernel and refine model Deprecates ToBinary and FromBinary in favor of Encode<U> and Decode. Uses ToParser as generic constraint for decode method Extends model to include let-binding variables as function body statements, as well as generic type parameters for function declarations Adds ToParser implementation for String | 08 October 2021, 19:25:14 UTC |
a9b6ad6 | Peter Duchovni | 17 September 2021, 20:52:56 UTC | rustgen: refactor decoder model Replace ad-hoc TryFrom implementations and constraints with a custom ToParser trait. Renames integral to prim, moves u8 code to submodule thereof of the name integral Decode generic type parameter is the serialized type and its implementor is the destination type. (May reverse this decision) Proper implementation of auto-derived Decode<U> for Option<T> based on Decode<ByteParser> for T. | 08 October 2021, 19:23:05 UTC |
52768ee | Peter Duchovni | 16 September 2021, 22:48:07 UTC | rustgen: refactor byteparser Refactors byteparser module into submodules under the name 'parse', with 'byteparser' reserved for the main ByteParser definition. | 08 October 2021, 19:23:05 UTC |
c72f9e8 | Peter Duchovni | 16 September 2021, 19:19:35 UTC | rustgen: scaffolding for boolean and option Extends implementation in tcc/rust/kernel library to facilitate future handling of boolean value parsing, as well as laying the groundwork required for automatically derived Option<T> codec implementations. Enriches and refactors the ParseError enumerator to allow for cleaner boilerplate at callsite, and to allow extensibility in future revisions of the model. | 08 October 2021, 19:23:05 UTC |
2afc450 | Peter Duchovni | 15 September 2021, 17:34:26 UTC | rustgen: add enum/struct AST support Adds the necessary infrastructure to the AST model to define structured and enumerated types in Rust. Experimental. | 08 October 2021, 19:23:03 UTC |
64b5799 | Peter Duchovni | 07 October 2021, 16:48:54 UTC | rustgen: refactor simplified, autofmt Add more documentation to the Common.Simplified module of codec_generator Refactor the `is_uint8` model of value-checking by introducing the (=~) superficial equality operator over Simplified.t values. Apply dune autoformat. | 07 October 2021, 16:49:03 UTC |
d06846a | Raphaël Proust | 04 October 2021, 07:40:08 UTC | Add generator target to CI | 04 October 2021, 07:40:08 UTC |
e884455 | Raphaël Proust | 04 October 2021, 07:36:04 UTC | Local, rather than global, open in rust ast | 04 October 2021, 07:36:04 UTC |
eddf6c8 | Peter Duchovni | 01 October 2021, 19:32:14 UTC | rustgen: elaborate errors, refactor ops Replaces Rust.Ast "assert false" cases with invalid_arg calls Renames `@.` (attribute operator) to `$.` to achieve left-associativity as desired; Refactors `@$` (function call operator) to `.$()` in order to mimic Rust style of parenthetical function application. Adds helpful let-statements to Rust.Generator mk_* clauses to declutter the Rust-style AST combinator statements. | 01 October 2021, 19:32:39 UTC |
bb58768 | Peter Duchovni | 30 September 2021, 22:55:24 UTC | rustgen: autoformat | 30 September 2021, 22:55:24 UTC |
b9075e4 | Peter Duchovni | 30 September 2021, 22:54:18 UTC | rustgen: fix gen/ast for pub tag Fixes minor issue with "pub" being supressed or doubled-up in pretty-printing/generation. | 30 September 2021, 22:54:18 UTC |
50f91ec | Peter Duchovni | 30 September 2021, 22:40:08 UTC | rustgen: refactor combinators Refactors Rust.Ast operators/functional combinators to more closely resemble the actual Rust syntax being represented. | 30 September 2021, 22:40:08 UTC |
77fb6b9 | Peter Duchovni | 29 September 2021, 19:23:16 UTC | rustgen: update README | 29 September 2021, 19:23:16 UTC |
321a3db | Peter Duchovni | 29 September 2021, 17:21:04 UTC | rustgen: reorgnaized rust packages | 29 September 2021, 17:21:04 UTC |
e9036ad | Peter Duchovni | 29 September 2021, 17:00:38 UTC | rustgen: directory restructuring | 29 September 2021, 17:00:38 UTC |
0c5f272 | Peter Duchovni | 29 September 2021, 16:40:57 UTC | rustgen: rename files and directories | 29 September 2021, 16:40:57 UTC |
58c0122 | Peter Duchovni | 27 September 2021, 16:55:37 UTC | rustgen: cleanup, readme, printer Add README.md file to explain the purpose and structure of the tcc submodule (as well as the origin of its name) Abstract over Stdlib.Format / out_channel dichotomy with custom Printer module, which defines combinators for outputting sequences of strings with some intervening structure depending on whether a Stdlib.Format.formatter or an out_channel is passed in to the outermost call. Refactor naming of types, modules, and type constructors to use Upper_snake_case rather than PascalCase to match the style of the rest of the library. Refactor all pretty-printing functions in rust.ml to use the Printer module paradigm and avoid all direct string concatenation using the `^` operator. | 27 September 2021, 16:55:42 UTC |
b4e8097 | Peter Duchovni | 14 September 2021, 22:52:57 UTC | rustgen: scaffolding for structs Adds commented-out prototype code for handling definition of Rust structs (either tuple- or record-kind) for future development. | 14 September 2021, 22:53:17 UTC |
08e7366 | Peter Duchovni | 14 September 2021, 15:24:13 UTC | rustgen: scaffolding for Encode and Decode traits Introduces scaffolding to facilitate the option of using the Encode/Decode generic traits over the ToBinary/FromBinary statics in future versions. TODO: test that this works | 14 September 2021, 15:24:13 UTC |
7e444b8 | Peter Duchovni | 14 September 2021, 14:36:58 UTC | rustgen: autoformat | 14 September 2021, 14:36:58 UTC |
aca45d8 | Peter Duchovni | 13 September 2021, 19:23:01 UTC | rustgen: modularize AST, introduce tests Splits of toplevel type definitions into submodules in tcc/rust.ml to allow for more clean reorganization or refactoring in future. Extends AST model to allow for test modules and test functions Modifies generator to produce test modules if sample values are provided. Adds test generation infrastructure to driver, currently only over a basic handful of sample inputs. | 13 September 2021, 19:23:01 UTC |
f9e9c86 | Peter Duchovni | 10 September 2021, 18:19:30 UTC | rustgen: extend AST, kernel, fix casing Adds type-parametric traits: - Encode<U> for `X -> U` encoding - Decode<T> for `T <- X `decoding where X is the type the trait is defined for, the LHS is the schema type, and the RHS is a binary-representing type Adds type-reflection and self-parameter support to the Rust AST model, as well as implementation blocks for traits Refactors ByteParser to use a mutable offset via Cell rather than Box, to allow for mutating the offset of immutably-borrowed ByteParser struct-values. This may be a mistake but it is easy enough to refactor again without really changing the API. Attempts to patch issue where the casing of names of types and functions in generated Rust-source required differently-formatted type-names to be acceptable (i.e. not emit warnings) using the current target model, by merely lowercasing typenames in functions without bothering to convert to actual snake-case TODO implement proper snake-case conversion | 10 September 2021, 18:19:30 UTC |
a90fa15 | Peter Duchovni | 08 September 2021, 17:33:20 UTC | rustgen: schema_rep catchall refactor Refactors out the catch-all in strip_alpha, and performs recursive resolution of potentially structure-preserving constructors that may resolve to uint8. Adds a more generic formula for source-file generation. | 08 September 2021, 17:33:20 UTC |
3331cda | Peter Duchovni | 07 September 2021, 22:37:58 UTC | rustgen: schema rep to AST generator Adds a generator module that provides facilities for constructing the Rust-AST values representing type-definitions, encoding functions, and decoding functions from intermediate representations of arbitrary encodings. Extends driver test to produce a sourcefile to check for compilation and verify behavior is as expected. | 07 September 2021, 22:37:58 UTC |
a13dfc0 | Peter Duchovni | 07 September 2021, 16:24:13 UTC | rustgen: add encoding converter and test Adds a very basic converter from 'a encoding values to an all-or-nothing Uint8-compatible intermediate represenation. Adds a simple test that verifies that encodings other than `uint8` are not converted to `AbstractUint8`, and `uint8` is | 07 September 2021, 16:24:46 UTC |
e4fe504 | Peter Duchovni | 30 August 2021, 17:16:50 UTC | rustgen: sample gen, ast model | 07 September 2021, 15:57:34 UTC |
2426157 | Peter Duchovni | 30 August 2021, 15:43:34 UTC | rustgen: extend kernel for conv trait | 07 September 2021, 15:57:34 UTC |
011df0c | Peter Duchovni | 26 August 2021, 18:34:54 UTC | rustgen: add rust kernel library prototype Add prototype for rust 'kernel' library, to use as the base API for generated rust-codecs | 07 September 2021, 15:57:34 UTC |
bed7f8b | Raphaël Proust | 06 September 2021, 07:51:26 UTC | Merge branch 'include_default_fields' into 'master' Json.construct: add optional argument include_default_fields See merge request nomadic-labs/data-encoding!52 | 06 September 2021, 07:51:26 UTC |
8b6c854 | Diane Gallois-Wong | 19 July 2021, 09:53:36 UTC | Json.construct: add optional argument include_default_fields This argument is directly passed on to Json_encoding.construct | 06 September 2021, 07:33:49 UTC |
1c073b8 | Raphaël Proust | 03 August 2021, 10:48:06 UTC | Merge branch 'phantom-ref-fix' into 'master' bugfix: add final fixup to toplevel in describe See merge request nomadic-labs/data-encoding!53 | 03 August 2021, 10:48:06 UTC |
439f304 | Raphaël Proust | 02 August 2021, 08:54:25 UTC | Simplify ref test | 03 August 2021, 10:34:03 UTC |
afe9ce1 | Raphaël Proust | 02 August 2021, 08:53:33 UTC | More precise comments in ref test (Remove mentions of "types") | 03 August 2021, 10:34:03 UTC |
dc5c236 | Peter Duchovni | 30 July 2021, 17:37:13 UTC | Test: combines mu_phantom and inline_phantom Unifies structurally similar test modules mu_phantom and inline_phantom (both novel to this MR) into reference_check, which exposes them as sub-modules using a common set of helper definitions to avoid code duplication. Also documents the purpose of the helper functions, and the specific bugs that the two sub-modules are designed to prove the correction of. | 03 August 2021, 10:34:03 UTC |
4ebba3a | Peter Duchovni | 26 July 2021, 18:03:35 UTC | Tests: add tests to prevent recurrence of bug Adds test modules `mu_phantom` and `inline_phantom` that respectively ensure that the toplevel type contains no dangling references. | 03 August 2021, 10:34:03 UTC |
22345a3 | Peter Duchovni | 26 July 2021, 16:39:23 UTC | bugfix: add final fixup to toplevel in describe Fixes two related bugs (issues #30 and #32) in which dangling references were preserved in the toplevel of an encoding even after the types they referred to were renamed or pruned. | 03 August 2021, 10:34:03 UTC |
ab152bb | Raphaël Proust | 02 August 2021, 09:38:38 UTC | Merge branch 'sir4ur0n/feat/exposeBinaryStreamT' into 'master' Add Binary_stream.t to public API See merge request nomadic-labs/data-encoding!54 | 02 August 2021, 09:38:38 UTC |
fd82a6d | Raphaël Proust | 30 July 2021, 14:49:21 UTC | document Binary.read_stream | 02 August 2021, 09:24:36 UTC |
3483980 | Julien Debon | 29 July 2021, 15:13:10 UTC | Add Binary_stream.[t|is_empty] to public API | 29 July 2021, 15:30:49 UTC |
ddc6827 | Raphaël Proust | 15 June 2021, 15:56:20 UTC | Merge branch 'test-412-in-CI' into 'master' Add 4.12 tests in the CI See merge request nomadic-labs/data-encoding!47 | 15 June 2021, 15:56:20 UTC |
57244fc | Raphaël Proust | 15 June 2021, 15:10:52 UTC | Update ocamlformat version, autoformat Note that ocamlformat.0.15.0 is not compatible with ocaml.4.12 | 15 June 2021, 15:10:52 UTC |
bb0aec8 | Raphaël Proust | 02 June 2021, 16:36:35 UTC | Add 4.12 tests in the CI | 02 June 2021, 16:36:35 UTC |
84afe98 | Raphaël Proust | 02 June 2021, 11:28:48 UTC | Merge branch 'prepare-for-v0.4' into 'master' Release v0.4 See merge request nomadic-labs/data-encoding!46 | 02 June 2021, 11:28:48 UTC |
57cfc11 | Raphaël Proust | 02 June 2021, 11:15:27 UTC | opam file fixes From @kit-ty-kate See https://github.com/ocaml/opam-repository/pull/18776 | 02 June 2021, 11:15:27 UTC |
9532815 | Raphaël Proust | 02 June 2021, 05:55:26 UTC | Mention some missing changes in CHANGES | 02 June 2021, 05:55:26 UTC |
97a338c | Raphaël Proust | 01 June 2021, 16:48:46 UTC | Merge branch 'fix-28' into 'master' Check bounds on int31 Closes #28 See merge request nomadic-labs/data-encoding!45 | 01 June 2021, 16:48:46 UTC |
52b1519 | Raphaël Proust | 01 June 2021, 08:08:10 UTC | test int31 rejection of out-of-bounds values | 01 June 2021, 09:53:05 UTC |
853eaf6 | Raphaël Proust | 26 May 2021, 08:26:23 UTC | Check bounds on int31 Fixes #28 | 01 June 2021, 08:11:13 UTC |
0185bbe | Raphaël Proust | 28 May 2021, 14:37:49 UTC | Merge branch 'support-for-user-invariants' into 'master' Support for user invariants Closes #14 and #9 See merge request nomadic-labs/data-encoding!43 | 28 May 2021, 14:37:49 UTC |
15c3363 | Raphaël Proust | 28 May 2021, 09:44:32 UTC | Fix code comments in binary readers | 28 May 2021, 09:44:32 UTC |
4b8391e | Raphaël Proust | 28 May 2021, 09:42:49 UTC | Fix typos in documentation | 28 May 2021, 09:42:49 UTC |
73e86ec | Raphaël Proust | 26 May 2021, 08:08:21 UTC | Do less catching (uses tiered exceptions (Local_read_error/Read_error)) | 26 May 2021, 08:08:21 UTC |
ad5821f | Raphaël Proust | 24 May 2021, 15:16:39 UTC | Document read-errors (and remove dead constructor) | 24 May 2021, 15:16:39 UTC |
876f093 | Raphaël Proust | 21 May 2021, 09:37:18 UTC | Tests for with_decoding_guard | 21 May 2021, 09:37:18 UTC |
fc15201 | Raphaël Proust | 21 May 2021, 09:36:27 UTC | Minor rename of user-invariant encodings | 21 May 2021, 09:37:14 UTC |
42fab55 | Raphaël Proust | 21 May 2021, 09:27:42 UTC | Merge branch 'encoding-docs' into 'master' Document some of the encoding constructors See merge request nomadic-labs/data-encoding!40 | 21 May 2021, 09:27:42 UTC |
a2e12f1 | Raphaël Proust | 17 May 2021, 12:03:17 UTC | fixup! Catch exceptions raised by user-provided functions | 21 May 2021, 09:26:45 UTC |
f9b6214 | Raphaël Proust | 17 May 2021, 12:02:28 UTC | Fix comments in guard test | 21 May 2021, 09:26:45 UTC |
99b2622 | Raphaël Proust | 17 May 2021, 11:57:19 UTC | Exception catching factorisation in binary decoders/encoders | 21 May 2021, 09:26:45 UTC |
d74afe4 | Raphaël Proust | 17 May 2021, 11:56:59 UTC | Add with_decoding_guard | 21 May 2021, 09:26:45 UTC |
6936753 | Raphaël Proust | 17 May 2021, 11:31:50 UTC | Special-case SO/OOM in other files | 21 May 2021, 09:26:45 UTC |
bc77cc4 | Raphaël Proust | 17 May 2021, 11:34:03 UTC | fixup! More specific error from conv_guard | 21 May 2021, 09:26:45 UTC |
f01af98 | Raphaël Proust | 14 May 2021, 12:01:08 UTC | More specific error from conv_guard | 21 May 2021, 09:26:45 UTC |
368a48f | Raphaël Proust | 14 May 2021, 07:43:49 UTC | Provide a guarded conv to help user handle invariants | 21 May 2021, 09:26:41 UTC |
e21772e | Raphaël Proust | 14 May 2021, 07:43:28 UTC | Catch exceptions raised by user-provided functions | 21 May 2021, 09:25:16 UTC |
6932288 | Raphaël Proust | 21 May 2021, 09:10:04 UTC | add dune-workspace Necessary for `dune build @fmt` to stay local | 21 May 2021, 09:10:04 UTC |
c0189bd | David Feuer | 05 March 2021, 08:13:26 UTC | Document some of the encoding constructors | 21 May 2021, 09:09:48 UTC |
f67cb75 | Raphaël Proust | 18 May 2021, 09:30:54 UTC | Merge branch 'slice' into 'master' Add binary slicing feature See merge request nomadic-labs/data-encoding!42 | 18 May 2021, 09:30:54 UTC |
c80e772 | Raphaël Proust | 17 May 2021, 11:27:41 UTC | Avoid catching runtime exception in registration slicer | 18 May 2021, 09:16:58 UTC |
f6875cb | Raphaël Proust | 17 May 2021, 09:37:03 UTC | Export Slicer as a module (not as an include) | 18 May 2021, 09:16:58 UTC |
8f7ea0a | Raphaël Proust | 23 March 2021, 07:48:34 UTC | Fix formatting | 18 May 2021, 09:16:58 UTC |
b4a516c | Raphaël Proust | 09 March 2021, 07:59:30 UTC | Slicer: improve comments | 18 May 2021, 09:16:58 UTC |
c1df6c1 | Raphaël Proust | 09 March 2021, 07:35:10 UTC | Cleaner interface for slicer | 18 May 2021, 09:16:58 UTC |
a654be0 | Raphaël Proust | 08 March 2021, 17:21:31 UTC | Slicer: comments, renaming and minor code aesthetics | 18 May 2021, 09:16:58 UTC |
79d4275 | Raphaël Proust | 08 March 2021, 16:55:39 UTC | Slicer: pass optional (rather than possibly empty) name around | 18 May 2021, 09:16:58 UTC |
2eacb86 | Raphaël Proust | 08 March 2021, 16:24:03 UTC | Remove unused test file | 17 May 2021, 09:50:15 UTC |
547413b | Artemiy | 19 February 2021, 10:14:08 UTC | Add slicing tests Co-authored-by: hernouf@yandex.ru | 17 May 2021, 09:50:15 UTC |
53e0b4c | Artemiy | 19 February 2021, 10:13:31 UTC | Link slicing with registration Co-authored-by: hernouf@yandex.ru | 17 May 2021, 09:50:15 UTC |
51c2a9a | Artemiy | 19 February 2021, 10:13:17 UTC | Link slicing with data_encoding Co-authored-by: hernouf@yandex.ru | 17 May 2021, 09:50:15 UTC |
40e5f92 | Artemiy | 19 February 2021, 10:13:05 UTC | Add binary slicing feature Co-authored-by: hernouf@yandex.ru | 17 May 2021, 09:50:15 UTC |
9a1e364 | Raphaël Proust | 09 March 2021, 08:43:28 UTC | Document integers better | 09 March 2021, 08:43:28 UTC |
34330d1 | Raphaël Proust | 04 February 2021, 15:42:10 UTC | Using @gasche's basic CI config | 17 February 2021, 13:00:30 UTC |
b752d3d | Raphaël Proust | 05 February 2021, 09:27:08 UTC | Separate benchmarks from tests | 17 February 2021, 13:00:03 UTC |
01cc025 | Raphaël Proust | 17 February 2021, 12:58:47 UTC | Update ocamlformat and format | 17 February 2021, 12:58:47 UTC |
137219a | Raphaël Proust | 05 February 2021, 13:34:32 UTC | Improve description of N and Z encodings | 17 February 2021, 09:39:25 UTC |
14b249b | Raphaël Proust | 16 February 2021, 10:03:43 UTC | Add test for sub-string tampering safety | 17 February 2021, 08:03:58 UTC |
e68e79c | Raphaël Proust | 11 February 2021, 08:43:31 UTC | Improve documentation of Binary.read | 16 February 2021, 14:24:35 UTC |
9fb13fd | Raphaël Proust | 03 February 2021, 11:13:48 UTC | Fix json schema of Bytes | 16 February 2021, 09:46:17 UTC |
ec00948 | Raphaël Proust | 03 February 2021, 15:16:53 UTC | Fix dune constraint upstreaming https://github.com/ocaml/opam-repository/pull/18078/commits/02f61426e730673db4eba22f9fb2f8c4a2d11ffc | 03 February 2021, 15:16:53 UTC |
23139a5 | Raphaël Proust | 03 February 2021, 11:43:11 UTC | Fix more 32 bit compatibility in tests | 03 February 2021, 11:43:11 UTC |