Nim implementation of the Preserves data language
Go to file
Emery Hemingway 64217706a4 Synchronize nimble version number
Nimble is a shit tool and shouldn't require a duplicate version
number in the nimble metadata file.
2021-11-07 22:19:47 +01:00
src Do not intersperse commas in sequences 2021-11-07 17:30:42 +01:00
tests mapEmbeds for Preserve[void] to Preserve[E] 2021-10-25 21:36:45 +02:00
upstream@2ff489d975 Add Spry VM module 2021-11-01 10:35:14 +01:00
.gitignore Schemas: use canonical meta-schema 2021-10-17 13:26:05 +02:00
.gitmodules Schemas: use canonical meta-schema 2021-10-17 13:26:05 +02:00
README.md Update documentation 2021-10-25 21:36:57 +02:00
UNLICENSE Unlicense 2021-08-31 17:00:00 +02:00
preserves.nimble Synchronize nimble version number 2021-11-07 22:19:47 +01:00

README.md

Preserves

Nim implementation of the Preserves data language.

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 and fromPreserve 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.