-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
@custom_serialize / @custom_deserialize DSL (#234)
* @custom_serialize / @custom_deserialize DSL e.g. `; @custom_serialize write_hex_bytes` For specifying externally-provided functions for arbitrary encodings/cbor details for (de)serialization. Allowed at both the type-level (affecting everywhere it's used) or at the field-level (overrides type-level if present). Example use-case: CML's PlutusData's Bytes (and BigInt) variant doesn't use arbitrary CBOR bytes strings but instead follows a specific chunking format. We used to hand code this but now we can just put this in the DSL. This is particularily useful for people generating plutus-datum-based CDDLs. It could also be used to allow for utf8 text (rust API) to be (de)serialized to bytes to be encodable as a datum. TODO: [ ] tests for preserve-encodings [ ] tests for tagged/otherwise extra encoding details over top of this * preserve-encodings=true tests * docs + more test cases + misc fixes * clarify where the custom_serialize string comes from
- Loading branch information
1 parent
6688c82
commit 200f1fe
Showing
13 changed files
with
2,958 additions
and
2,117 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.