marslang rs-0.9.0

rs-0.6.0 — Rust interpreter and packages#

Marslang is now an interpreted language. The JavaScript backend is removed: marslang file.mars parses, checks, and runs a program directly in Rust. Node is no longer needed to run programs or tests.

Interpreter#

Behavior changes from rs-0.5.0:

Packages#

takepkg is a package system, similar to Python's:

See Packages.

Standard library in Marslang#

std.math (42 functions, six constants) is written entirely in Marslang in std/math.mars, including argument checks, rounding, signs, integer pow, hypot, and interpolation. Only irreducible primitives are native Rust packages under std/rs/: rs.core (raise a named error, read a value's kind) and rs.math (platform float functions). Only standard packages may import rs.*.

build.rs registers every std/*.mars file as std.NAME and every std/rs/*.rs file as rs.NAME, so adding a standard package needs no list edits.

Validation#

cargo test passes 78 tests (9 unit, 69 execution, none ignored) on Windows Rust and on WSL-native Rust. Execution tests run programs in the interpreter and assert their output or runtime errors.

Remaining work#

A per-user package directory (such as C:\Users\<user>\marslang_pkgs) and an installer are planned. Wildcard imports, decorators, deque, further standard packages, match, run/handle/then, async, and self-hosting remain pending.