veltrix
Practical Unix utilities, paths, and Unicode emoji data for Rust.
veltrix is a lightweight Rust crate focused on useful Unix-first APIs, generated Unicode emoji metadata, and ergonomic developer helpers.
It is designed for projects that want clean utilities without pulling in large frameworks or overly broad abstractions.
Features
- 🐧 Unix identity, process, and environment helpers
- 📁 Path utilities for common user locations
- ⏱️ OS/runtime clock helpers
- 😀 Generated Unicode emoji dataset
- 🔎 Emoji names, groups, versions, and keywords
- ⚙️ Feature-gated modules
- 🦀 Small, Rust-first APIs
Installation
[]
= "0.7.3"
Optional features:
= { = "0.7.3", = [
"async",
"podman",
"docker",
"caddy",
"systemd-dbus",
"technitium",
"data-bools",
"data-time",
"unicode",
"unicode-emojis",
"ldap",
] }
Feature Flags
| Feature | Enables |
|---|---|
async |
Tokio-based async process execution |
unistd |
Unix identity, group, hostname, and privilege helpers |
unicode |
Unicode parent module |
unicode-emojis |
Canonical Unicode emoji path plus emoji data |
podman |
Podman CLI/socket integration |
podman-socket |
Podman async Unix-socket backend (implies podman) |
docker |
Docker CLI/socket/Compose foundation types |
docker-socket |
Docker async Unix-socket backend (implies docker) |
caddy |
Caddy admin API integration |
systemd |
systemd service management helpers |
systemd-dbus |
systemd D-Bus manager backend via busctl |
technitium |
Technitium DNS API integration |
data |
Data parent module |
data-bools |
Boolean parsing and formatting helpers |
data-time |
Time value parsing and formatting helpers |
full |
All non-legacy feature groups |
Modules
veltrix::os::unistd
Unix-only helpers for users, groups, processes, and environment.
Core Identity
use *;
let uid = getuid;
let euid = geteuid;
let gid = getgid;
let pid = getpid;
println!;
Available types and functions:
UidGidPidgetuid()geteuid()getgid()getegid()getpid()getppid()
User / Group Lookup
use *;
let root = uid_by_username;
let user = username_by_uid;
let groups = groups_for_uid;
Available helpers:
username_by_uid()uid_by_username()groupname_by_gid()gid_by_groupname()primary_gid_by_uid()groups_for_uid()
Host / Process Environment
use *;
let host = gethostname?;
let cwd = getcwd?;
let home = home_dir;
chdir?;
Available helpers:
gethostname()getcwd()chdir()home_dir()
Privilege Helpers
use *;
if is_effective_root
if user_in_admin_group
Available helpers:
is_root()is_effective_root()user_in_group()user_in_admin_group()has_common_admin_group()
Admin group helpers are convenience heuristics and not authoritative privilege checks.
veltrix::os::paths
Helpers for common user and application paths.
let bin = user_bin_path?;
println!;
veltrix::os::clock
Runtime and platform clock helpers.
use clock;
let wall = now;
let started = monotonic;
let timestamp = unix_timestamp?;
let uptime = uptime?;
println!;
veltrix::data
Value-level parsing and formatting helpers.
use ;
let enabled = parse_truthy_falsy?;
let duration = parse_duration?;
assert_eq!;
assert_eq!;
veltrix::services
Typed integrations for local and self-hosted service management (Podman, Docker, Caddy, systemd, Technitium DNS). Each service is feature-gated; incomplete integrations expose foundation types before full workflow clients.
// Example: Podman (requires "podman" feature)
use ;
let podman = new;
let containers = podman.containers?;
podman.run_container_with_labels?;
let quadlet = container
.label
.auto_update
.render;
// Example: Docker (requires "docker" feature)
use ;
let docker = new;
let containers = docker.containers?;
let images = docker.images?;
let compose = new;
compose.up?;
// Example: Caddy (requires "caddy" feature)
use ;
let caddy = new;
caddy.validate?;
let admin = localhost_default;
let config = local_https_reverse_proxy?;
admin.load_config.await?;
// Example: systemd (requires "systemd" feature)
use ;
let systemd = new;
let status = systemd.status?;
let active = systemd.is_active?;
let units = systemd.list_units?;
let logs = systemd.tail_journal_entries?;
// Example: Technitium DNS (requires "technitium" feature)
use ;
let dns = new?;
let zones = dns.zones.await?;
let answer = dns.resolve.await?;
let record = acme_challenge_name;
let caddy_record = caddy_acme_challenge_name;
dns.set_acme_challenge.await?;
Supported services:
- Podman (container runtime)
- Docker (container runtime, socket, and Compose workflows)
- Caddy (web server / reverse proxy)
- systemd (service management)
- Technitium DNS (DNS server)
See Technitium ACME DNS-01 Certificates for the v0.7.0 certificate helper flow.
veltrix::unicode::emojis
Generated Unicode emoji metadata with search-friendly fields.
use ;
for emoji in ALL.iter.take
let smile = find_by_search_term;
Each emoji entry includes:
- emoji character
- canonical name
- group
- subgroup
- codepoints
- keywords
- normalized search terms
- emoji version
- Unicode Emoji data version
- skin-tone and variation-selector metadata
The legacy veltrix::emojis path was removed for v0.7.0. Use veltrix::unicode::emojis.
Design Goals
veltrix is built around:
- practical APIs first
- small focused modules
- low runtime overhead
- strong types where useful
- generated static data
- no unnecessary complexity
Platform Support
Unix
Primary supported target.
Examples:
- Linux
- macOS
- BSD
- other Unix-like systems
Windows
Not currently supported.
Windows compatibility is not a present goal.
Stability
veltrix is pre-release. APIs may evolve before 1.0.
License
MIT OR Apache-2.0