From 6588e94400ea67bbef2fd3769f40a714a7eec8bc Mon Sep 17 00:00:00 2001 From: Evan Date: Mon, 27 Mar 2023 18:48:31 -0500 Subject: [PATCH] update docs removing cgo and non semver versioning --- docs/content/get-started/index.md | 31 ++----------------------------- 1 file changed, 2 insertions(+), 29 deletions(-) diff --git a/docs/content/get-started/index.md b/docs/content/get-started/index.md index 9c5f198af..5d318fcf8 100644 --- a/docs/content/get-started/index.md +++ b/docs/content/get-started/index.md @@ -5,47 +5,20 @@ aliases = ["/get-started"] ## Installing -To start using Badger, install Go 1.19 or above. Badger v2 needs go modules. Run the following command to retrieve the library. +To start using Badger, install Go 1.19 or above. Run the following command to retrieve the library. ```sh $ go get github.com/dgraph-io/badger/v4 ``` This will retrieve the library. -{{% notice "note" %}} Badger does not directly use CGO but it relies on https://github.com/DataDog/zstd for compression and it requires gcc/cgo. If you wish to use badger without gcc/cgo, you can run `CGO_ENABLED=0 go get github.com/dgraph-io/badger/...` which will download badger without the support for ZSTD compression algorithm.{{% /notice %}} - ### Installing Badger Command Line Tool -Download and extract the latest Badger DB release from https://github.com/dgraph-io/badger/releases and then run the following commands. - ```sh -$ cd badger-/badger -$ go install +$ go install github.com/dgraph-io/badger/v4/badger@latest ``` This will install the badger command line utility into your $GOBIN path. -### Choosing a version - -BadgerDB is a pretty special package from the point of view that the most important change we can -make to it is not on its API but rather on how data is stored on disk. - -This is why we follow a version naming schema that differs from Semantic Versioning. - -- New major versions are released when the data format on disk changes in an incompatible way. -- New minor versions are released whenever the API changes but data compatibility is maintained. - Note that the changes on the API could be backward-incompatible - unlike Semantic Versioning. -- New patch versions are released when there's no changes to the data format nor the API. - -Following these rules: - -- v1.5.0 and v1.6.0 can be used on top of the same files without any concerns, as their major - version is the same, therefore the data format on disk is compatible. -- v1.6.0 and v2.0.0 are data incompatible as their major version implies, so files created with - v1.6.0 will need to be converted into the new format before they can be used by v2.0.0. - -For a longer explanation on the reasons behind using a new versioning naming schema, you can read -[VERSIONING.md](https://github.com/dgraph-io/badger/blob/master/VERSIONING.md) - ## Opening a database The top-level object in Badger is a `DB`. It represents multiple files on disk in specific directories, which contain the data for a single database.