robinpath-modules 0.7.1

61 extended modules for the RobinPath scripting language — CSV, Regex, HTTP, Crypto, OAuth, JWT, Queue, i18n, and more
Documentation

robinpath-modules

61 extended modules for the RobinPath scripting language — CSV, Regex, HTTP, Crypto, OAuth, JWT, Queue, i18n, and more.

Every module is feature-gated, so you only compile what you use. All modules are enabled by default.

Usage

Add to your Cargo.toml:

[dependencies]
robinpath = "0.2"
robinpath-modules = "0.7"

Then register all modules with a RobinPath instance:

use robinpath::RobinPath;

fn main() {
    let mut rp = RobinPath::new();
    robinpath_modules::register_all(&mut rp);

    rp.execute(r#"
        set $data = csv.parse("name,age\nAlice,30\nBob,25")
        print json.stringify($data)
    "#).unwrap();

    for line in rp.output() {
        println!("{}", line);
    }
}

Async usage

Enable the async_bridge feature and use tokio::spawn_blocking under the hood:

[dependencies]
robinpath-modules = { version = "0.7", features = ["default", "async_bridge"] }
let result = robinpath_modules::async_bridge::execute_async(r#"
    set $x = math.sqrt(144)
    $x
"#).await.unwrap();

Modules

All 61 modules are enabled by default. Disable default-features and pick only what you need:

[dependencies]
robinpath-modules = { version = "0.7", default-features = false, features = ["csv", "json", "regex_mod"] }
Category Modules
Data formats csv, json, xml, yaml, toml_mod, ini, html, markdown
Strings & text string_mod, regex_mod, template, sanitize, diff
Encoding encode (base64/hex), url_mod, color
Crypto & security crypto, hash, encrypt, jwt, oauth
Networking http, api, webhook, graphql, cookie, ip
Math & numbers math_ext, semver, money, phone
Collections collection, table, pagination
System fs, os, path, env, dotenv, shell, process, glob_mod
Validation validate, schema, email, mime, assert
State & control cache, queue, event, config, log_mod
Resilience retry, ratelimit, cron
Data generation faker, uuid
Utilities transform, i18n, zip

Per-instance state

Stateful modules (cache, queue, config, etc.) use per-instance state rather than global statics. Two RobinPath instances never share state:

let mut rp1 = RobinPath::new();
let mut rp2 = RobinPath::new();
robinpath_modules::register_all(&mut rp1);
robinpath_modules::register_all(&mut rp2);

rp1.execute(r#"cache.set("key", "only-in-rp1")"#).unwrap();
rp2.execute(r#"set $v = cache.get("key")"#).unwrap(); // null — isolated

This means tests run in parallel without interference and multiple interpreters can coexist safely.

Repository

github.com/wiredwp/robinpath-rs-modules

License

MIT