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 theauto example:
Commit all of them. The bundle that
rslc export writes is a build product.
Check
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:
Format
RSL has one layout, andrslc 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:
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.jsonandruntime/rslc_wasm.wasmbeside the source. - Export leaves a scenario out of the bundle.
Bundle contents
Bundle contents
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.CI
A job that runs these commands holds a project to its format, its checks and its worked examples:
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:
rslc examples get NAME saves a complete program that passes the check.
Editors and agents
- Format on save. Run
rslc fmt FILEwhen the editor saves an.rslfile. - Show the messages.
rslc check --json FILEprints one JSON object. It holdsok, thecost, and each diagnostic with itscode,messageandlocation. - Give an agent the reference. An agent that writes RSL reads
rslc explain,rslc docsandrslc examplesin place of a web search. They match the installed compiler.
--json and then prints one JSON value on standard output.