aboutsummaryrefslogtreecommitdiff
path: root/entries/skairunner/README.md
diff options
context:
space:
mode:
authorBraxton Hall2022-11-17 07:10:23 +0000
committerGitHub2022-11-17 07:10:23 +0000
commitc3ad989c8e7a2636da82e36d68f677c15a270438 (patch)
tree5b445fd4cee240977ba9dbbd1c4f599f93621bcf /entries/skairunner/README.md
parente84294edd3859dd175ef1074f0ef5aa3e467f7fb (diff)
parent36ddffec9fc05b0a3c99d30efa4d5b26bbde8c13 (diff)
Merge branch 'main' into main
Diffstat (limited to 'entries/skairunner/README.md')
-rw-r--r--entries/skairunner/README.md24
1 files changed, 24 insertions, 0 deletions
diff --git a/entries/skairunner/README.md b/entries/skairunner/README.md
new file mode 100644
index 0000000..1d98b17
--- /dev/null
+++ b/entries/skairunner/README.md
@@ -0,0 +1,24 @@
+# What is it
+
+A Fibonacci generator that produces a valid Protobuf3 file.
+
+Each message is Fibonacci#, where # is the number in the sequence (i.e. f(#)).
+The field "number" has a field number corresponding to the value of f(#) and a random type.
+
+The field `prevprev` has the type of the message corresponding to f(n-2) and has a field number of the value of f(n-2).
+Similarly, the field "prev" has the type of the message for f(n-1) and the field number of f(n-1).
+
+Fibonacci1 does not have `prevprev`/`prev` because field numbers have to be greater than 0.
+Fibonacci2 does not have `prevprev` for the same reason, while `prev` is omitted because duplicate field numbers are forbidden and f(1) = f(2).
+Fibonacci3 does not have `prevprev` either.
+
+The last sequence number generated is 43, because after that the field numbers become too large and are illegal.
+
+## Running
+With `cargo` installed on your system, `cargo run` will compile and output the protobuf file to stdout.
+
+To verify that the protobuf compiles, something like
+```
+cargo run > fib.proto && protoc -odescriptors.proto fib.proto
+```
+should work. Note that you will need `protoc` to do that. \ No newline at end of file