# fornwall/rust-script

Run Rust files and expressions as scripts without any setup or compilation step.

Repository: https://github.com/fornwall/rust-script
Canonical: https://ross.abutalabs.com/products/rust-script
Homepage: https://rust-script.org
Language: Rust
License: Apache-2.0
License Family: permissive
Topics: rust, script, cargo
Last push: 2025-08-16T09:36:23+00:00

## Health v2 (maintenance only)
Score: 40/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 37, release rhythm 11, longevity 100
- inputs: {"age_days": 2139, "days_push": 382, "days_rel": 382, "gap_med": 346, "n_releases_24m": 2}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1653, forks 53 (observed 2026-08-28T04:05:17.105369+00:00)

## What it is
rust-script is a command-line tool that runs Rust files and expressions as scripts without any setup or explicit compilation step. It generates and caches a Cargo build behind the scenes and supports declaring crate dependencies embedded within the script itself.

## Use cases
- run a rust file like a python script
- write quick one-off rust scripts with dependencies
- use rust as a scripting language with shebang
- filter command pipelines with rust expressions
- run unit tests and benchmarks from a single rust file
- prototype rust code without creating a cargo project

## When to choose
- you want to execute small Rust programs or snippets without scaffolding a Cargo project
- you need scripts in a compiled language with inline dependency declarations
- you want fast repeated runs via cached compiled artifacts

## When to avoid
- you need fast startup for frequently changing scripts since each change triggers recompilation
- you are building a full application or library where a normal Cargo project is more appropriate
- you cannot install Rust 1.74 or newer

## Facets
- artifact type: cli-tool
- maturity: active
- function: cli, build-tool, developer-tools
- domain: developer-tools, programming-languages
- platform: windows, cli, cross-platform
- tags: rust, scripting, cargo, shebang, compiled-scripts, command-line, linux, macos

## Member repositories
- fornwall/rust-script (main) score 40

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:05:17.105369+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T03:44:57.957549+00:00, confidence not recorded.
  - readme: https://github.com/fornwall/rust-script (fetched 2026-08-28T04:05:17.105369+00:00, sha 5946670565bd)
  - homepage: https://rust-script.org (fetched 2026-08-29T11:17:54.575863+00:00, sha afa553cb09c7)
  - registry_crates: https://crates.io/api/v1/crates/rust-script (fetched 2026-08-29T11:17:54.585543+00:00, sha e2e99dce5d3d)
- Data as of 2026-08-30T08:39:29.467469+00:00.
