Tooling & CLI
Documentation for Solnix command-line tools and development utilities.
Solnix CLI
The solnix command-line interface provides a minimal and reliable way to manage and work with Solnix projects. It acts as the primary entry point for common tasks like building Solnix programs. For more details, visit the Solnix CLI GitHub repository.
Basic Usage
To see available commands and options, use:
solnix --help
Solnix Compiler (solnixc)
The Solnix Compiler (solnixc) is the core component that translates Solnix source code into eBPF object files. It is a security-focused, verifier-safe programming language designed for kernel-level policy enforcement, monitoring, and system protection. For more details, visit the Solnix Compiler GitHub repository.
Building Programs
The solnix build command (which uses solnixc internally) compiles Solnix source files into eBPF object files.
Basic Usage
solnix build test.snx
This command will generate test.o, an eBPF object file that can be loaded into the kernel.
Compiler Architecture
The Solnix compiler internally uses solnixc to process your Solnix source code. For eBPF programs, the compiler generates object files using C language as the intermediate representation, which are then compiled to eBPF bytecode.
Example
# Compile a Solnix program
solnix build test.snx
# Output: test.o (eBPF object file)