/rust-nation-2024-egg-timer

A Crux demo app for a tutorial session at RustNation 2024

Primary LanguageTypeScript

Egg timer

This is a demo project for my tutorial talk from at Rust Nation '24.

It is a countdown timer app, to demonstrate how Crux approaches testing side-effects using the real time "wall clock" needed for the countdown.

Slides

The slides from the talk are available as PDF in this repo, and provide background to the demo.

Get in touch

The best way to get in touch with questions is via the Crux community Zulip chat.

Get started

You will need:

Branches

### main branch

The main branch of this repo is a starting point for the tutorial, where all the boilerplate setup has been done, and a static UI has been prepared for the timer.

To run the demo, you need to run the type generation from the shared_types folder

cd shared_types && cargo build

You can then run the web UI by going into the web folder and runing

pnpm i
pnpm run dev

wip branch

To step through the demo, check out the commits on the wip branch, one by one. You can also read the changes on PR #1. Most of the commits are focused on the core of the app in a shared/src/app.rs, except for the very last one, which links the UI to the core.

Every step of the way, tests of the shared crate verify that that the changes made are working.