Examples
Every example is a complete project: a directory with oxl.toml, sources and tests. Download the archive, unpack it and
run oxl run and oxl test. The tests and output of the examples are checked on every build of the repository (ctest
examples_projects, shop_*), the fragments in the text of the pages on every build of the site (Д6).
| Example | What it shows | Level |
|---|---|---|
| hello | package, modules, arguments, a test | beginner |
| wordcount | @error, ?, Map, queries, a file | beginner |
| streams | stream, yield, std.stream operators, |> | intermediate |
| ffi-demo | calling C (import c), export c fn | intermediate |
| notes-orm | @table, from … select queries, SQLite | intermediate |
| bank-saga | a service, a sharded actor, a saga with compensation | advanced |
| testing-demo | fixtures, mock, calls, simulation | intermediate |
| counter-cluster | roles, oxl dev --nodes 4, shards | advanced |
| shop | the distributed shop of Standard V.5 | full service |
All sources are also listed in Programs of the repository: every file has its own page and a "Download" button. Single-file examples that run right on the page are in the tour of the language.
How to run#
unzip hello.zip && cd hello
oxl test
oxl run -- Ann