Installation Guide

This guide walks you through the process of installing Oxibase on different platforms and environments.

Table of Contents

  1. Prerequisites
  2. Installation Methods
    1. Method 1: Using Cargo (Recommended)
    2. Method 2: Add as Dependency
    3. Method 3: Building from Source
  3. Platform-Specific Instructions
    1. macOS
    2. Linux
    3. Windows
  4. Using Oxibase as a Library
  5. Verifying Installation
  6. Next Steps
  7. Troubleshooting

Prerequisites

  • Rust 1.70 or later (with Cargo)
  • Git (for installation from source)
  • Basic familiarity with command line tools

Installation Methods

The easiest way to install Oxibase is via Cargo:

cargo install oxibase

This command downloads the source code, compiles it, and installs the binary into your ~/.cargo/bin directory.

Method 2: Add as Dependency

To use Oxibase as a library in your Rust project:

[dependencies]
oxibase = "0.1"

Method 3: Building from Source

If you need the latest features or want to make modifications:

# Clone the repository
git clone https://github.com/oxibase/oxibase.git

# Navigate to the directory
cd oxibase

# Build and install locally
cargo install --path .

Platform-Specific Instructions

macOS

On macOS, after cloning the repository:

cd oxibase
cargo install --path .

This installs the binary to ~/.cargo/bin/oxibase (ensure ~/.cargo/bin is in your PATH).

Linux

For Linux users, after cloning the repository:

cd oxibase
cargo install --path .

This installs the binary to ~/.cargo/bin/oxibase (ensure ~/.cargo/bin is in your PATH).

Windows

On Windows, after cloning the repository:

  1. Navigate to the directory: cd oxibase
  2. Install locally: cargo install --path .
  3. The binary will be at %USERPROFILE%\.cargo\bin\oxibase.exe (ensure %USERPROFILE%\.cargo\bin is in your PATH)

Using Oxibase as a Library

To use Oxibase in your Rust application:

[dependencies]
oxibase = "0.1"

Then use it in your code:

use oxibase::Database;

fn main() -> Result<(), Box<dyn std::error::Error>> {
    // Create in-memory database
    let db = Database::open("memory://")?;

    // Create a table
    db.execute("CREATE TABLE users (id INTEGER PRIMARY KEY, name TEXT)", ())?;

    // Insert data with parameters
    db.execute("INSERT INTO users VALUES ($1, $2)", (1, "Alice"))?;

    // Query data
    for row in db.query("SELECT * FROM users", ())? {
        let row = row?;
        let id: i64 = row.get("id")?;
        let name: String = row.get("name")?;
        println!("User {}: {}", id, name);
    }

    Ok(())
}

See the API Reference for complete documentation of the Oxibase API.

Verifying Installation

To verify that Oxibase CLI was installed correctly:

oxibase --version

This should display the version number of your Oxibase installation.

Next Steps

After installing Oxibase, you can:

Troubleshooting

If you encounter issues during installation:

  • Ensure Rust is installed: rustc --version (should be 1.70+)
  • Ensure Cargo is available: cargo --version
  • For permission issues on Linux/macOS, use sudo as needed

If problems persist, please open an issue on GitHub with details about your environment and the error you’re experiencing.


Copyright © 2025-2026 Oxibase Contributors. Gabriel Maeztu.