Go to file
Mahmoud-Emad 758e59e921 docs: Improve README.md with clearer structure and installation
- Update README.md to provide a clearer structure and improved
  installation instructions.  This makes it easier for users to
  understand and use the library.
- Remove outdated and unnecessary sections like the workspace
  structure details, publishing status, and detailed features
  lists. The information is either not relevant anymore or can be
  found elsewhere.
- Simplify installation instructions to focus on the core aspects
  of installing individual packages or the meta-package with
  features.
- Add a dedicated section for building and running tests,
  improving developer experience and making the process more
  transparent.
- Modernize the overall layout and formatting for better
  readability.
2025-07-13 12:51:08 +03:00
.github/workflows feat: Add CI/CD workflows for testing and publishing SAL crates 2025-07-01 08:34:20 +03:00
aiprompts ... 2025-04-04 15:05:48 +02:00
docs feat: Convert SAL to a Rust monorepo 2025-06-18 14:12:36 +03:00
examples feat: Update SAL Vault examples and documentation 2025-07-10 14:03:43 +03:00
git feat: Add CI/CD workflows for testing and publishing SAL crates 2025-07-01 08:34:20 +03:00
herodo feat: Add CI/CD workflows for testing and publishing SAL crates 2025-07-01 08:34:20 +03:00
installers ... 2025-06-16 07:30:37 +02:00
kubernetes feat: Add Kubernetes examples and update dependencies 2025-07-10 00:40:11 +03:00
mycelium feat: Add CI/CD workflows for testing and publishing SAL crates 2025-07-01 08:34:20 +03:00
net feat: Add CI/CD workflows for testing and publishing SAL crates 2025-07-01 08:34:20 +03:00
os feat: Add CI/CD workflows for testing and publishing SAL crates 2025-07-01 08:34:20 +03:00
postgresclient feat: Add CI/CD workflows for testing and publishing SAL crates 2025-07-01 08:34:20 +03:00
process feat: Add CI/CD workflows for testing and publishing SAL crates 2025-07-01 08:34:20 +03:00
redisclient feat: Add CI/CD workflows for testing and publishing SAL crates 2025-07-01 08:34:20 +03:00
rhai feat: Update SAL Vault examples and documentation 2025-07-10 14:03:43 +03:00
rhai_tests feat: Update zinit-client dependency to 0.4.0 2025-07-10 11:27:59 +03:00
scripts feat: Update zinit-client dependency to 0.4.0 2025-07-10 11:27:59 +03:00
service_manager feat: Update zinit-client dependency to 0.4.0 2025-07-10 11:27:59 +03:00
src feat: Add service manager support 2025-07-01 18:00:21 +03:00
text feat: Add CI/CD workflows for testing and publishing SAL crates 2025-07-01 08:34:20 +03:00
vault feat: Update SAL Vault examples and documentation 2025-07-10 14:03:43 +03:00
virt feat: Add CI/CD workflows for testing and publishing SAL crates 2025-07-01 08:34:20 +03:00
zinit_client feat: Update zinit-client dependency to 0.4.0 2025-07-10 11:27:59 +03:00
.gitignore feat: Enhance service manager with zinit socket discovery and systemd fallback 2025-07-02 16:37:27 +03:00
build_herodo.sh feat: Add herodo package to workspace 2025-06-23 13:19:20 +03:00
Cargo.toml feat: Update zinit-client dependency to 0.4.0 2025-07-10 11:27:59 +03:00
LICENSE Initial commit 2025-04-02 05:08:51 +00:00
PUBLISHING.md feat: Add CI/CD workflows for testing and publishing SAL crates 2025-07-01 08:34:20 +03:00
README.md docs: Improve README.md with clearer structure and installation 2025-07-13 12:51:08 +03:00
run_rhai_tests.sh feat: Migrate SAL to Cargo workspace 2025-06-24 12:39:18 +03:00

SAL (System Abstraction Layer)

Version 0.1.0 - A modular Rust library for cross-platform system operations and automation.

SAL provides a unified interface for system operations with Rhai scripting support through the herodo tool.

Installation

# Core functionality
cargo add sal-os sal-process sal-text sal-net

# Infrastructure
cargo add sal-git sal-vault sal-kubernetes sal-virt

# Database clients
cargo add sal-redisclient sal-postgresclient sal-zinit-client

# Scripting
cargo add sal-rhai

Meta-package with Features

cargo add sal --features core              # os, process, text, net
cargo add sal --features infrastructure    # git, vault, kubernetes, virt
cargo add sal --features all               # everything

Herodo Script Runner

cargo install herodo

Quick Start

Rust Library Usage

use sal_os::fs;
use sal_process::run;

fn main() -> Result<(), Box<dyn std::error::Error>> {
    let files = fs::list_files(".")?;
    println!("Found {} files", files.len());

    let result = run::command("echo hello")?;
    println!("Output: {}", result.stdout);
    Ok(())
}

Herodo Scripting

# Create script
cat > example.rhai << 'EOF'
let files = find_files(".", "*.rs");
print("Found " + files.len() + " Rust files");

let result = run("echo 'Hello from SAL!'");
print("Output: " + result.stdout);
EOF

# Run script
herodo example.rhai

Available Packages

Package Description
sal-os Operating system operations
sal-process Process management
sal-text Text processing
sal-net Network operations
sal-git Git repository management
sal-vault Cryptographic operations
sal-kubernetes Kubernetes management
sal-virt Virtualization tools
sal-redisclient Redis client
sal-postgresclient PostgreSQL client
sal-zinit-client Zinit process supervisor
sal-mycelium Mycelium network client
sal-service-manager Service management
sal-rhai Rhai scripting integration
sal Meta-crate with features
herodo Script executor binary

Building & Testing

# Build all packages
cargo build --workspace

# Run tests
cargo test --workspace

# Run Rhai integration tests
./run_rhai_tests.sh

Core Features

  • System Operations: File/directory management, environment access, OS commands
  • Process Management: Create, monitor, and control system processes
  • Containerization: Buildah and nerdctl integration
  • Version Control: Git repository operations
  • Database Clients: Redis and PostgreSQL support
  • Networking: HTTP, TCP, SSH connectivity utilities
  • Cryptography: Key management, encryption, digital signatures
  • Text Processing: String manipulation and templating
  • Scripting: Rhai script execution via herodo

Herodo Scripting

herodo executes Rhai scripts with access to all SAL modules:

herodo script.rhai                # Run single script
herodo script.rhai arg1 arg2      # With arguments
herodo /path/to/scripts/          # Run all .rhai files in directory

Example Script

// File operations
let files = find_files(".", "*.rs");
print("Found " + files.len() + " Rust files");

// Process execution
let result = run("echo 'Hello SAL!'");
print("Output: " + result.stdout);

// Redis operations
redis_set("status", "running");
let status = redis_get("status");
print("Status: " + status);

License

Licensed under the Apache License 2.0. See LICENSE for details.