Nim implementation of the Preserves data language
Go to file
Emery Hemingway 9ae435a83c Add text parsing to BufferedDecoder 2024-03-12 12:26:13 +00:00
src Add text parsing to BufferedDecoder 2024-03-12 12:26:13 +00:00
tests Replace #! notation with #: 2024-02-08 14:24:01 +00:00
.gitignore Generate graphs for PEGs 2023-12-24 21:24:02 +02:00
README.md Add note on syndicate-nim to README 2023-04-05 20:05:42 -05:00
Tupfile Add lockfile 2023-10-19 18:14:14 +01:00
Tuprules.tup Add lockfile 2023-10-19 18:14:14 +01:00
UNLICENSE Unlicense 2021-08-31 17:00:00 +02:00
depends.tup Remodel Preserves[E] into Value 2024-01-08 12:36:29 +02:00
lock.json Split pkSignedInteger into pkRegister and pkBigInt 2024-01-01 17:32:50 +02:00
preserves.nimble Remove gcsafe annotations 2024-03-12 12:25:52 +00:00
schema.bin Remove submodule 2022-02-19 10:33:16 -06:00
schema.prs Replace #! notation with #: 2024-02-08 14:24:01 +00:00

README.md

Preserves

Nim implementation of the Preserves data language.

If you don't know why you need Preserves, see the Syndicate library.

Library

To parse or produce Preserves one should write a schema and generate a Nim module using the preserves_schema_nim utility. This module will contain Nim types corresponding to schema definitions. The toPreserve andfromPreserve routines will convert Nim types to and from Preserves. The decodePreserves, parsePreserves, encode, and $ routines will convert Preserve objects to and from binary and textual encoding.

To debug the toPreserves and fromPreserves routines compile with -d:tracePreserves.

Utilities

  • preserves_schema_nim
  • preserves_encode
  • preserves_decode
  • preserves_from_json
  • preserves_to_json

Installation

preserves_encode is a multi-call binary that implements preserves_encode, preserves_decode, preserves_from_json, and preserves_to_json, so the appropriate symlinks should be created during packaging.