Skip to content

Commit bad9378

Browse files
committed
Merge branch '12-prepare-release-v0-14' into 'dev'
Resolve "Release v0.14" See merge request objectbox/objectbox-generator!11
2 parents e443abc + d6e0092 commit bad9378

File tree

2 files changed

+26
-10
lines changed

2 files changed

+26
-10
lines changed

README.md

Lines changed: 22 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,29 +5,43 @@
55

66
# ObjectBox Generator
77

8-
Current version: 0.13.0
8+
Current version: 0.14.0
99

1010
ObjectBox is a superfast cross-platform object-oriented database.
1111
ObjectBox Generator produces binding code for ObjectBox C, C++ and Go APIs (more languages to be supported in the future).
1212
This greatly simplifies using ObjectBox in your favourite language.
1313

14-
## Prerequisites/Installation
14+
## Download
1515

1616
Install the objectbox-generator by downloading the latest binary for your OS from [releases](https://github.com/objectbox/objectbox-generator/releases/latest).
1717
If you want, add it to `$PATH` for convenience.
18-
Alternatively, instead of downloading, you can build the generator yourself by cloning this repo and running `make`.
19-
To build yourself, you need a recent Go version, CMake and a C++11 tool chain.
18+
19+
## Build
20+
21+
If you prefer to build the generator yourself (vs. downloading), clone this repo and simply run `make`.
22+
This will produce an "objectbox-generator" binary in the main project directory.
23+
24+
Build notes:
25+
26+
* To build yourself, you need Go, Make, CMake and a C++11 tool chain.
27+
* To run test suite, run `make test-depend test`.
28+
* `test-depend` needs to run only once to download objectbox core library and to build flatcc.
29+
* A full test cycle can be triggered by `make clean all test-depend test`.
2030

2131
## Getting started
2232

23-
To get started, have a look at the projects based on your language of choice:
24-
* C and C++ [repository](https://github.com/objectbox/objectbox-c) and [docs](https://cpp.objectbox.io/)
25-
* Go [repository](https://github.com/objectbox/objectbox-go) and [docs](https://golang.objectbox.io/)
33+
To get started, have a look at the specific language bindings (the approaches differ):
34+
35+
* C and C++ [repository](https://github.com/objectbox/objectbox-c) and [docs](https://cpp.objectbox.io/).
36+
In summary, you define a FlatBuffers schema file, and the ObjectBox Generator will create plain C++ data classes
37+
and helper classes that "glue" the data classes to the ObjectBox runtime library.
38+
* Go [repository](https://github.com/objectbox/objectbox-go) and [docs](https://golang.objectbox.io/).
39+
Here, you start with Go data structs, for which the Generator generates the glue code directly.
2640

2741
# License
2842

2943
```
30-
Copyright (C) 2022 ObjectBox Ltd. All rights reserved.
44+
Copyright (C) 2018-2024 ObjectBox Ltd. All rights reserved.
3145
https://objectbox.io
3246
This file is part of ObjectBox Generator.
3347

internal/generator/generator.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (C) 2020 ObjectBox Ltd. All rights reserved.
2+
* Copyright (C) 2018-2024 ObjectBox Ltd. All rights reserved.
33
* https://objectbox.io
44
*
55
* This file is part of ObjectBox Generator.
@@ -34,10 +34,12 @@ import (
3434
)
3535

3636
// Version specifies the current generator version.
37-
const Version = "0.13.0"
37+
const Version = "0.14.0"
3838

3939
// VersionId specifies the current generator version identifier.
4040
// It is used to validate generated code compatibility and is increased when there are changes in the generated code.
41+
// This validation seems to be limited to Go: the generated code "knows" its version,
42+
// and thus we can check at runtime if the generated code matches the lib version.
4143
// Internal generator changes that don't change the output (in an incompatible way) do not cause an increase.
4244
const VersionId = 6
4345

0 commit comments

Comments
 (0)