diff --git a/README.md b/README.md index 5673300..4443b21 100644 --- a/README.md +++ b/README.md @@ -5,29 +5,43 @@ # ObjectBox Generator -Current version: 0.13.0 +Current version: 0.14.0 ObjectBox is a superfast cross-platform object-oriented database. ObjectBox Generator produces binding code for ObjectBox C, C++ and Go APIs (more languages to be supported in the future). This greatly simplifies using ObjectBox in your favourite language. -## Prerequisites/Installation +## Download Install the objectbox-generator by downloading the latest binary for your OS from [releases](https://github.com/objectbox/objectbox-generator/releases/latest). If you want, add it to `$PATH` for convenience. -Alternatively, instead of downloading, you can build the generator yourself by cloning this repo and running `make`. -To build yourself, you need a recent Go version, CMake and a C++11 tool chain. + +## Build + +If you prefer to build the generator yourself (vs. downloading), clone this repo and simply run `make`. +This will produce an "objectbox-generator" binary in the main project directory. + +Build notes: + +* To build yourself, you need Go, Make, CMake and a C++11 tool chain. +* To run test suite, run `make test-depend test`. +* `test-depend` needs to run only once to download objectbox core library and to build flatcc. +* A full test cycle can be triggered by `make clean all test-depend test`. ## Getting started -To get started, have a look at the projects based on your language of choice: -* C and C++ [repository](https://github.com/objectbox/objectbox-c) and [docs](https://cpp.objectbox.io/) -* Go [repository](https://github.com/objectbox/objectbox-go) and [docs](https://golang.objectbox.io/) +To get started, have a look at the specific language bindings (the approaches differ): + +* C and C++ [repository](https://github.com/objectbox/objectbox-c) and [docs](https://cpp.objectbox.io/). + In summary, you define a FlatBuffers schema file, and the ObjectBox Generator will create plain C++ data classes + and helper classes that "glue" the data classes to the ObjectBox runtime library. +* Go [repository](https://github.com/objectbox/objectbox-go) and [docs](https://golang.objectbox.io/). + Here, you start with Go data structs, for which the Generator generates the glue code directly. # License ``` -Copyright (C) 2022 ObjectBox Ltd. All rights reserved. +Copyright (C) 2018-2024 ObjectBox Ltd. All rights reserved. https://objectbox.io This file is part of ObjectBox Generator. diff --git a/internal/generator/generator.go b/internal/generator/generator.go index b8ab247..e99d782 100644 --- a/internal/generator/generator.go +++ b/internal/generator/generator.go @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020 ObjectBox Ltd. All rights reserved. + * Copyright (C) 2018-2024 ObjectBox Ltd. All rights reserved. * https://objectbox.io * * This file is part of ObjectBox Generator. @@ -34,10 +34,12 @@ import ( ) // Version specifies the current generator version. -const Version = "0.13.0" +const Version = "0.14.0" // VersionId specifies the current generator version identifier. // It is used to validate generated code compatibility and is increased when there are changes in the generated code. +// This validation seems to be limited to Go: the generated code "knows" its version, +// and thus we can check at runtime if the generated code matches the lib version. // Internal generator changes that don't change the output (in an incompatible way) do not cause an increase. const VersionId = 6