diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 00000000..00d5119f --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,3 @@ +## 0.1.0 + +First declared version. Everything is new! diff --git a/src/cli/vm.c b/src/cli/vm.c index e258091a..2754b617 100644 --- a/src/cli/vm.c +++ b/src/cli/vm.c @@ -257,7 +257,7 @@ int runRepl() initVM(); printf("\\\\/\"-\n"); - printf(" \\_/ wren v0.0.0\n"); + printf(" \\_/ wren v%s\n", WREN_VERSION_STRING); char line[MAX_LINE_LENGTH]; diff --git a/src/include/wren.h b/src/include/wren.h index 4c9e1de7..afe801dd 100644 --- a/src/include/wren.h +++ b/src/include/wren.h @@ -5,6 +5,20 @@ #include #include +// The Wren semantic version number components. +#define WREN_VERSION_MAJOR 0 +#define WREN_VERSION_MINOR 1 +#define WREN_VERSION_PATCH 0 + +// A human-friendly string representation of the version. +#define WREN_VERSION_STRING "0.1.0" + +// A monotonically increasing numeric representation of the version number. Use +// this if you want to do range checks over versions. +#define WREN_VERSION_NUMBER (WREN_VERSION_MAJOR * 1000000 + \ + WREN_VERSION_MINOR * 1000 + \ + WREN_VERSION_PATCH) + // A single virtual machine for executing Wren code. // // Wren has no global state, so all state stored by a running interpreter lives