Lay out a project
Goal: structure a multi-file project with source and tests, and build it.
A project is a directory containing a bynk.toml manifest plus src/ and
tests/ trees:
my-project/├── bynk.toml├── src/│ ├── counters.bynk # context counters│ └── quantities.bynk # commons quantities└── tests/ ├── counters.bynk # test counters └── quantities.bynk # test quantitiesThe manifest
Section titled “The manifest”bynk.toml names the project and its directory layout:
[project]name = "my-project"version = "0.1.0"
[paths]src = "src"tests = "tests"See the bynk.toml reference for every key.
Path identity
Section titled “Path identity”A unit’s path must match its qualified name. A file declaring context counters
must be src/counters.bynk; one declaring context commerce.orders must be
src/commerce/orders.bynk. A test file mirrors the name of the unit it tests
under tests/, so test counters lives in tests/counters.bynk — or, with the
optional self-identifying suffix, tests/counters.test.bynk. Both forms are
accepted (the .test.bynk suffix is what single-tree layouts use, and is handy
for grepping); use whichever you prefer.
Mismatches are reported as
bynk.project.inconsistent_commons_name(source) orbynk.project.inconsistent_test_path(tests).
Build and test
Section titled “Build and test”bynkc compile . --output out # compile the projectbynkc test . # compile and run the testsbynkc check . # type-check only