Go to file
Mahmoud Emad 7add64562e
Some checks are pending
Rhai Tests / Run Rhai Tests (pull_request) Waiting to run
feat: Simplify asymmetric encryption/decryption
- Simplify asymmetric encryption by using a single symmetric key
  instead of deriving a key from an ephemeral key exchange.  This
  improves clarity and reduces complexity.
- The new implementation encrypts the symmetric key with the
  recipient's public key and then encrypts the message with the
  symmetric key.
- Improve test coverage for asymmetric encryption/decryption.
2025-05-13 14:45:05 +03:00
.github/workflows ci: Add CI workflow for Rhai tests 2025-05-08 15:09:16 +03:00
.roo ... 2025-04-03 06:08:18 +02:00
aiprompts ... 2025-04-04 15:05:48 +02:00
docs ... 2025-05-12 06:09:25 +03:00
examples Merge branch 'zinit_client' 2025-05-12 06:12:40 +03:00
rhai_tests feat: Add comprehensive test suite for Keypair module 2025-05-12 15:44:14 +03:00
src feat: Simplify asymmetric encryption/decryption 2025-05-13 14:45:05 +03:00
.gitignore ... 2025-05-12 06:09:25 +03:00
build_herodo.sh ... 2025-04-05 19:00:59 +02:00
Cargo.toml ... 2025-05-13 07:28:02 +03:00
LICENSE Initial commit 2025-04-02 05:08:51 +00:00
README.md ... 2025-04-02 08:45:47 +02:00
run_rhai_tests.sh refactor: Improve Rhai test runner and vault module code 2025-05-12 12:47:37 +03:00

SAL (System Abstraction Layer)

A Rust library that provides a unified interface for interacting with operating system features across different platforms. It abstracts away platform-specific details, allowing developers to write cross-platform code with ease.

Features

  • File System Operations: Simplified file and directory management
  • Process Management: Create, monitor, and control processes
  • System Information: Access system details and metrics
  • Git Integration: Interface with Git repositories
  • Redis Client: Robust Redis connection management and command execution
  • Text Processing: Utilities for text manipulation and formatting

Modules

Redis Client

The Redis client module provides a robust wrapper around the Redis client library for Rust, offering:

  • Automatic connection management and reconnection
  • Support for both Unix socket and TCP connections
  • Database selection via environment variables
  • Thread-safe global client instance
  • Simple command execution interface

View Redis Client Documentation

OS Module

Provides platform-independent interfaces for operating system functionality.

Git Module

Tools for interacting with Git repositories programmatically.

Process Module

Utilities for process creation, monitoring, and management.

Text Module

Text processing utilities for common operations.

Usage

Add this to your Cargo.toml:

[dependencies]
sal = "0.1.0"

Basic example:

use sal::redisclient::execute;
use redis::cmd;

fn main() -> redis::RedisResult<()> {
    // Execute a Redis command
    let mut cmd = redis::cmd("SET");
    cmd.arg("example_key").arg("example_value");
    execute(&mut cmd)?;
    
    // Retrieve the value
    let mut get_cmd = redis::cmd("GET");
    get_cmd.arg("example_key");
    let value: String = execute(&mut get_cmd)?;
    println!("Value: {}", value);
    
    Ok(())
}