]> gitweb.factorcode.org Git - factor.git/commitdiff
bare: adding docs
authorJohn Benediktsson <mrjbq7@gmail.com>
Wed, 15 Jun 2022 20:11:15 +0000 (13:11 -0700)
committerJohn Benediktsson <mrjbq7@gmail.com>
Wed, 15 Jun 2022 20:11:15 +0000 (13:11 -0700)
extra/bare/bare-docs.factor [new file with mode: 0644]

diff --git a/extra/bare/bare-docs.factor b/extra/bare/bare-docs.factor
new file mode 100644 (file)
index 0000000..69fb9d1
--- /dev/null
@@ -0,0 +1,41 @@
+USING: byte-arrays help.markup help.syntax io kernel ;
+
+IN: bare
+
+HELP: read-bare
+{ $values { "schema" "schema" } { "obj" object } }
+{ $description "Decodes an object that was serialized in the BARE format using " { $snippet "schema" } ", reading from an " { $link input-stream } "." } ;
+
+HELP: write-bare
+{ $values { "obj" object } { "schema" "schema" } }
+{ $description "Encodes an object into the BARE format using " { $snippet "schema" } ", writing to an " { $link output-stream } "." } ;
+
+HELP: bare>
+{ $values { "encoded" byte-array } { "schema" "schema" } { "obj" object } }
+{ $description "Decodes an object that was serialized in the BARE format using " { $snippet "schema" } ", reading from a " { $link byte-array } "." } ;
+
+HELP: >bare
+{ $values { "obj" object } { "schema" "schema" } { "encoded" byte-array } }
+{ $description "Encodes an object into the BARE format using " { $snippet "schema" } "." } ;
+
+ARTICLE: "bare" "Binary Application Record Encoding (BARE)"
+"The Binary Application Record Encoding (BARE) is a draft format defined at " 
+{ $url "https://baremessages.org" } "."
+$nl
+"Decoding support for the BARE protocol:"
+{ $subsections
+    read-bare
+    bare>
+}
+"Encoding support for the BARE protocol:"
+{ $subsections
+    write-bare
+    >bare
+}
+"Using schema files:"
+{ $subsections
+    parse-schema
+    \ SCHEMA:
+} ;
+
+ABOUT: "bare"