Skip to main content
rslc is one program with a command for each job. Install Relativities to get it. Commands lists every command and option. The examples on this page use RSL 0.4. Author a rater in either edition shows how to use the RSL 0.5 preview to check and export a rater.

Project layout

Keep one program in one folder. This page uses the auto example:
Commit all of them. The bundle that rslc export writes is a build product.

Check

The cost line counts the work of one rating as the lists grow. A failed check prints FAIL and one message for each problem, with its code, its place in the file and a fix. Guarantees states what a passing check proves. To read why a check exists, pass the code of its message to rslc explain:
The entry shows a file that gets the message, then the corrected file. Check messages holds the same entries by topic.

Format

RSL has one layout, and rslc fmt writes it. A team that formats on save sees only real changes in its diffs.
rslc fmt FILE rewrites a file in place and prints FORMATTED FILE. --check leaves the file as it is, and prints a diff when the layout differs.

Test

rslc eval runs a scenario: one set of inputs and the values you expect. The auto rater holds its scenario in rater.rsl:
Test a rater writes a scenario and adds independent premiums and sampled requests. For a guideline, rslc script plays a submission and checks each step; see Run a submission.

Packaging

  • Name a new output file. Export fails when the file exists already.
  • Export also writes rater-manifest.json and runtime/rslc_wasm.wasm beside the source.
  • Export leaves a scenario out of the bundle.
A rater that imports other RSL files or reads enumeration members from CSV files carries those files too. The book schema follows the inputs of the rater, and the prepare function passes the values on unchanged. Package a program writes a prepare of your own.
Rate submissions with a rater loads the bundle in Python.

CI

A job that runs these commands holds a project to its format, its checks and its worked examples:
Each command gives its result as its exit status, so the job stops at the first failure: Install the same release of rslc in CI as on each author’s machine. Versions explains which number is which.

Terminal reference

rslc docs prints the reference of the installed version, offline:
The same text builds the reference pages of this site, such as Names and Functions. rslc examples get NAME saves a complete program that passes the check.

Editors and agents

  • Format on save. Run rslc fmt FILE when the editor saves an .rsl file.
  • Show the messages. rslc check --json FILE prints one JSON object. It holds ok, the cost, and each diagnostic with its code, message and location.
  • Give an agent the reference. An agent that writes RSL reads rslc explain, rslc docs and rslc examples in place of a web search. They match the installed compiler.
Each command takes --json and then prints one JSON value on standard output.