Thanks for your interest in contributing to the Cozo project!
As Cozo is just getting started, we aim to keep everything simple.
Contributions to code or other materials
should be done via [pull requests](https://github.com/cozodb/cozo/pulls).
You will be automatically prompted to sign a [Contributor Agreement (CLA)](https://github.com/cozodb/cozo-docs/blob/main/CLA.md).
As the project matures, ideally before the end of 2023, we will change the CLA requirement to a DCO requirement: see [here](https://opensource.com/article/18/3/cla-vs-dco-whats-difference)
if you are not familiar with the difference.
The reason that we are asking for CLA now is that we want to retain the option to make changes that would become
very difficult if copyright is distributed among the contributors, for example if we decide (again)
that a different (FOSS) license would suit the project better. If you are uncomfortable with any form of CLA,
you can wait until then.
For code contributions other than simple bug fixes, please
[discuss](https://github.com/cozodb/cozo/discussions) it
</span><spanstyle="color: rgb(0, 153, 255);"> help: </span><span>Note that symbols occurring only in negated positions are not considered bound
</span><spanstyle="color: rgb(0, 153, 255) !important;"> help: </span><span>Note that symbols occurring only in negated positions are not considered bound
</span></pre>
## Install
As Cozo is an embedded database,
there are lots of options for installing it.
We aim to provide packaged distributions (binary when applicable) for the most common language/OS/arch combinations:
| Host language | OS | Installation TL;DR | Details |
| Clojure (with JDK 11+) | B* | Use `com.github.zh217:cozo-clj` (maven repo: https://clojars.org/repo) in your package manager, [like this](https://clojars.org/com.github.zh217/cozo-clj) | [cozo-clj](https://github.com/cozodb/cozo-clj) |
| Java 11+ | B* | Use `com.github.zh217:cozo-lib-java` (maven repo: https://clojars.org/repo) in your package manager, [like this](https://clojars.org/com.github.zh217/cozo-lib-java) | [cozo-lib-java](https://github.com/cozodb/cozo-lib-java) |
| Rust | Any | Add `cozo = <VERSION>` to your Cargo.toml under `[dependencies]` | [docs.rs](https://docs.rs/cozo) |
| C/C++ or language with C FFI ([Go](https://pkg.go.dev/cmd/cgo), [Ruby](https://github.com/ffi/ffi), [Haskell](https://wiki.haskell.org/Foreign_Function_Interface), ...) | A* | Use the [C header file](https://github.com/cozodb/cozo/blob/main/cozo-lib-c/cozo_c.h), and download the static/dynamic library `libcozo_c-*` from the [release page](https://github.com/cozodb/cozo/releases/) | [cozo-lib-c](https://github.com/cozodb/cozo/tree/main/cozo-lib-c) |
| Standalone (HTTP server) | A* | Download `cozoserver-*` for your system from the [release page](https://github.com/cozodb/cozo/releases/), uncompress, and run in a terminal | [cozoserver](https://github.com/cozodb/cozo/blob/main/standalone.md) |
for the OS column:
* **B** includes:
* Recent versions of Linux running on x86_64
* Recent versions of MacOS running on ARM (M1/M2) and x86_64
* Recent versions of Windows on x86_64
* **A** includes everything in **B**, and:
* Recent versions of Linux running on aarch64
If a packaged distribution is not available for you, you can still compile
from source.
For embedded use, a single database directory can only be used by one process at any moment.
The database can be used from multiple threads within the single process and everything is thread-safe.
If you need multi-process access to a single database, use the standalone server.
Ease of installation is a priority for Cozo.
If you feel that something should be done to improve the current user experience,
please raise it [here](https://github.com/cozodb/cozo/discussions).
## Getting started
### Clojure
You should already have the package `com.github.zh217/cozo-clj` installed.
The following runs the three queries in turn (can be used in a repl):
```clojure
(use 'cozo-clj.core)
(in-ns 'cozo-clj.core)
(def db (open-db "_test_db"))
(iquery db "?[] <-[['hello','world!']]")
(iquery db "?[] <-[['hello','world',$name]]"{:name"Clojure"})
(iquery db "?[a] <-[[1,2]]")
```
Use `query` instead of `iquery` if you are not using REPL.
### Java
You should already have the package `com.github.zh217:cozo-lib-java` in the maven repo `https://clojars.org/repo`
| [Rust](https://docs.rs/cozo/) | Source only, usable on any [platform](https://doc.rust-lang.org/nightly/rustc/platform-support.html) with `std` support | MQRST |
| [Golang](https://github.com/cozodb/cozo-lib-go) | Linux (x86_64, ARM64), Mac (ARM64, x86_64), Windows (x86_64) | MQR |
| [C/C++/language with C FFI](./cozo-lib-c) | Linux (x86_64, ARM64), Mac (ARM64, x86_64), Windows (x86_64) | MQR |
| [Standalone HTTP server](./cozoserver) | Linux (x86_64, ARM64), Mac (ARM64, x86_64), Windows (x86_64) | MQRST |