Installation
Install and run InputLayer on your system.
Prerequisites
- Rust 1.88+ - InputLayer is written in Rust
- Cargo - Rust's package manager (comes with Rust)
Installing Rust
If you don't have Rust installed, use rustup:
curl '=https' .2 https://sh.rustup.rs | sh
After installation, restart your terminal or run:
source $HOME/.cargo/env
Verify installation:
rustc # Should show 1.88.0 or higher
cargo
Installation Options
Option 1: Install from crates.io (Recommended)
cargo install inputlayer inputlayer
This installs the inputlayer-client binary to ~/.cargo/bin/.
Option 2: Build from Source
# Clone the repository
git clone https://github.com/inputlayer/inputlayer.git
cd inputlayer
# Build in release mode
cargo build
# The binaries are in target/release/
./target/release/inputlayer # Start server first
./target/release/inputlayer # Then connect with client
Option 3: Run without Installing
For quick testing without installing:
cargo run inputlayer &
cargo run inputlayer
Verify Installation
Start the server, then connect with the client:
inputlayer &
inputlayer
You should see:
Connecting to server at http://127.0.0.1:8080...
Connected!
Server status: healthy
Authenticated as: admin
Current knowledge graph: default
Try a simple command:
> .kg list
Knowledge graphs:
default
Type .quit to exit.
Configuration (Optional)
InputLayer works out of the box with sensible defaults. For customization, create a config file:
Location options:
./config.toml(current directory, auto-loaded)./config.local.toml(local overrides, git-ignored, auto-loaded)- Custom path via
--config <path>CLI flag
Example configuration:
data_dir = "./data"
default_knowledge_graph = "default"
num_threads = 4
buffer_size = 10000
durability_mode = "batched"
Data Directory
By default, InputLayer stores data in ./data/ (current working directory). Set data_dir in the config file to customize.
The data directory contains:
./data/
├── default/ # Default knowledge graph
│ └── rules/ # Persistent rule definitions (catalog.json)
├── persist/ # DD-native persist layer
│ ├── shards/ # Shard metadata
│ ├── batches/ # Compacted batch files
│ └── wal/ # Write-ahead log
└── metadata/ # System metadata
Next Steps
Now that you have InputLayer installed:
- Your First Program - Write your first InputLayer program
- Core Concepts - Understand facts, rules, and queries
- REPL Guide - Master the interactive environment
Troubleshooting
Command not found: inputlayer-client
Make sure ~/.cargo/bin is in your PATH:
export PATH="$HOME/.cargo/bin:$PATH"
Add this line to your ~/.bashrc or ~/.zshrc for persistence.
Build fails with missing dependencies
On some Linux systems, you may need development libraries:
# Ubuntu/Debian
sudo apt install build pkg libssl
# Fedora
sudo dnf install gcc pkg openssl
# macOS (if needed)
xcode
Permission denied when writing data
Ensure you have write permissions to the data directory:
mkdir ./data
chmod 755 ./data