| Crates.io | herosal |
| lib.rs | herosal |
| version | 0.1.1 |
| created_at | 2025-12-14 02:31:34.950381+00 |
| updated_at | 2025-12-14 13:37:06.092341+00 |
| description | System Abstraction Layer - A library for easy interaction with operating system features |
| homepage | |
| repository | https://github.com/threefoldtech/sal |
| max_upload_size | |
| id | 1983666 |
| size | 862,224 |
This repository contains the Herocode Herolib Rust library and a collection of scripts, examples, and utilities for building, testing, and publishing the SAL (System Abstraction Layer) crates. The repository includes:
os, process, text, git, vault, kubernetes, etc.).The repository provides three primary helper scripts located in the repository root:
| Script | Description | Typical Usage |
|---|---|---|
scripts/publish-all.sh |
Publishes all SAL crates to crates.io in the correct dependency order. Handles version bumping, dependency updates, dry‑run mode, and rate‑limiting. | ./scripts/publish-all.sh [--dry-run] [--wait <seconds>] [--version <ver>] |
build_herodo.sh |
Builds the herodo binary from the herodo package and optionally runs a specified Rhai script. |
./build_herodo.sh [script_name] |
run_rhai_tests.sh |
Executes all Rhai test suites across the repository, logging results and providing a summary. | ./run_rhai_tests.sh |
Below are detailed usage instructions for each script.
scripts/publish-all.sh--version is supplied).| Option | Description |
|---|---|
--dry-run |
Shows what would be published without actually publishing. |
--wait <seconds> |
Wait time between publishes (default: 15 s). |
--version <ver> |
Set a new version for all crates (updates Cargo.toml files). |
-h, --help |
Show help message. |
# Dry run – no crates will be published
./scripts/publish-all.sh --dry-run
# Publish with a custom wait time and version bump
./scripts/publish-all.sh --wait 30 --version 1.2.3
# Normal publish (no dry‑run)
./scripts/publish-all.sh
Cargo.toml lives).cargo and a logged‑in cargo session (cargo login).Cargo.toml to use the new version before publishing.build_herodo.shherodo binary from the herodo package./usr/local/bin) if run as root, otherwise to ~/hero/bin.# Build only
./build_herodo.sh
# Build and run a specific Rhai script (e.g., `example`):
./build_herodo.sh example
herodo crate (cargo build), and copies the binary.src/rhaiexamples/<name>.rhaisrc/herodo/scripts/<name>.rhairun_rhai_tests.shrhai_tests directory and the newer */tests/rhai layout.run_rhai_tests.log and prints a summary.# Run all tests
./run_rhai_tests.sh
run_rhai_tests.log) contains full output for later review.0 if all tests pass, 1 otherwise.build_herodo.sh to compile the herodo binary.run_rhai_tests.sh to ensure all Rhai scripts pass.scripts/publish-all.sh (with --dry-run first to verify).cargo, rustc) installed.herodo) built and available.See LICENSE for details.
Happy coding!