ringkernel-cli-0.3.2 is not a library.
ringkernel-cli
Command-line tool for RingKernel project scaffolding, kernel code generation, and compatibility checking.
Installation
From crates.io
From source
Commands
ringkernel new - Create a New Project
Create a new RingKernel project with pre-configured templates:
# Basic project
# With specific template
# Specify GPU backends
# Custom path
Templates:
| Template | Description |
|---|---|
basic |
Minimal project with single kernel (default) |
persistent-actor |
Persistent GPU actor with H2K/K2H messaging |
wavesim |
Wave simulation with stencil kernels |
enterprise |
Production-ready with enterprise features |
Options:
-t, --template <TEMPLATE>- Project template (default:basic)-p, --path <PATH>- Target directory-b, --backends <BACKENDS>- GPU backends (default:cuda)--no-git- Skip git repository initialization
ringkernel init - Initialize in Existing Project
Add RingKernel to an existing Rust project:
# With specific backends
# Force overwrite existing config
This adds:
- RingKernel dependencies to
Cargo.toml ringkernel.tomlconfiguration file- Example kernel in
src/kernels/
ringkernel codegen - Generate GPU Code
Generate GPU kernel code from Rust DSL:
# Generate CUDA code
# Generate multiple backends
# Custom output directory
# Generate specific kernel
# Preview without writing files
Options:
-b, --backend <BACKEND>- Target backends:cuda,wgsl,msl(default:cuda)-o, --output <DIR>- Output directory for generated code-k, --kernel <NAME>- Generate specific kernel only--dry-run- Preview generated code without writing files
ringkernel check - Validate Compatibility
Check kernel compatibility across GPU backends:
# Check all kernels in src/
# Check specific directory
# Check against specific backends
# Check all backends
# Detailed report
Options:
-p, --path <PATH>- Directory to scan (default:src)-b, --backends <BACKENDS>- Backends to check (default:all)--detailed- Show detailed compatibility report
Example output:
Checking kernel compatibility...
src/kernels/processor.rs:
process_messages:
✓ CUDA - Compatible
✓ WGSL - Compatible (64-bit atomics emulated)
✗ MSL - Incompatible (K2K not supported)
src/kernels/stencil.rs:
fdtd_step:
✓ CUDA - Compatible
✓ WGSL - Compatible
✓ MSL - Compatible
Summary: 3/4 kernels fully compatible across all backends
ringkernel completions - Shell Completions
Generate shell completion scripts:
# Bash
# Zsh
# Fish
# PowerShell
ringkernel profile (Planned)
Profile kernel performance:
Note: This command is planned for a future release.
Configuration
Create ringkernel.toml in your project root:
[]
= "my-gpu-app"
= "0.1.0"
[]
= "cuda"
= ["cuda", "wgpu"]
[]
= "generated"
= true
[]
= "sm_80"
= "7.0"
[]
= [256, 1, 1]
Global Options
-v, --verbose- Enable verbose output-q, --quiet- Suppress all output except errors--version- Show version information--help- Show help
Examples
Create and Build a Project
# Create new project with persistent actor template
# Navigate to project
# Generate CUDA code
# Build and run
CI/CD Integration
# .github/workflows/check.yml
name: RingKernel Check
on:
jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- run: cargo install ringkernel-cli
- run: ringkernel check --backends all --detailed
License
Licensed under Apache-2.0 OR MIT.