Skip to content

Commit

Permalink
Merge branch '12-prepare-release-v0-14' into 'dev'
Browse files Browse the repository at this point in the history
Resolve "Release v0.14"

See merge request objectbox/objectbox-generator!11
  • Loading branch information
dan-obx committed Mar 4, 2024
2 parents e443abc + d6e0092 commit bad9378
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 10 deletions.
30 changes: 22 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
6 changes: 4 additions & 2 deletions internal/generator/generator.go
Original file line number Diff line number Diff line change
@@ -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.
Expand Down Expand Up @@ -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

Expand Down

0 comments on commit bad9378

Please sign in to comment.