Skip to content

Development

Leonard Ramminger edited this page Aug 31, 2026 · 1 revision

Development

Prerequisites

  • Rust stable
  • protoc (Protocol Buffers compiler)
  • For WASM tests: wasm-pack

Makefile commands

Command Action
make build cargo build
make build-all cargo build --all-features
make test cargo test --all-features
make test-wasm WASM tests via wasm-pack
make lint cargo clippy --all-features
make fmt cargo fmt
make fmt-check cargo fmt --check
make ci fmt-check, lint, test, coverage
make coverage tarpaulin with 85% fail-under

Single test examples

cargo test test_parse_valid_yaml
cargo test --test client_test
cargo test --features ffi --test ffi_test -- --test-threads 1

Code style

  • Errors via YcallrError and thiserror
  • Serde for YAML and JSON; prost for Protobuf
  • No unwrap() in production FFI (return null plus last error)
  • Run make fmt before committing

Boundaries

  • Do not edit generated prost output in OUT_DIR
  • proto/api.proto changes need matching updates in compiler/conversions.rs and models/
  • Do not commit user API YAML under ~/.config/ycallr/apis/

Clone this wiki locally