diff --git a/BUILDING.md b/BUILDING.md new file mode 100644 index 00000000..743b16ad --- /dev/null +++ b/BUILDING.md @@ -0,0 +1,35 @@ +# Building Cozo from source + +You need to install the [Rust toolchain](https://www.rust-lang.org/tools/install) on your system. +You also need a C++17 compiler. + +Clone the Cozo git repo: + +```bash +git clone https://github.com/cozodb/cozo.git --recursive +``` + +You need to pass the `--recursive` flag so that submodules are also cloned. +Next, run in the root of the cloned repo: + +```bash +cargo build --release +``` + +Wait for potentially a long time, and you will find the compiled binary in `target/release`. + +You can run `cargo build --release -F jemalloc` instead +to indicate that you want to compile and use jemalloc as the memory allocator for the RocksDB storage backend, +which can make a difference in performance depending on your workload. + +To build the C library: + +```bash +cargo build --release --manifest-path=cozo-lib-c/Cargo.toml +``` + +To build the Java library used by [cozo-lib-java](https://github.com/cozodb/cozo-lib-java): + +```bash +cargo build --release --manifest-path=cozo-lib-java/Cargo.toml +``` \ No newline at end of file diff --git a/README.md b/README.md index e07021ae..5c06aa42 100644 --- a/README.md +++ b/README.md @@ -296,7 +296,7 @@ you will be greeted with a very simple JS client: Now you know how to run queries in your chosen language, you can start learning CozoScript: -* Start with the [Tutorial](https://nbviewer.org/github/cozodb/cozo/blob/main/docs/tutorial/tutorial.ipynb) to learn the +* Start with the [Tutorial](https://nbviewer.org/github/cozodb/cozo-docs/blob/main/tutorial/tutorial.ipynb) to learn the basics; * Continue with the [Manual](https://cozodb.github.io/current/manual/) for the fine points. @@ -340,7 +340,7 @@ in specific situations: performance problems easier. * Your data may be simple, even a single table, but it is inherently a graph. * We have seen an example in - the [Tutorial](https://nbviewer.org/github/cozodb/cozo/blob/main/docs/tutorial/tutorial.ipynb): + the [Tutorial](https://nbviewer.org/github/cozodb/cozo-docs/blob/main/tutorial/tutorial.ipynb): the air route dataset, where the key relation contains the routes connecting airports. * In traditional databases, when you are given a new relation, you try to understand it by running aggregations on it to collect statistics: