ethanol-rs WASM Example

This example demonstrates the ethanol-rs pharmacokinetics library running in WebAssembly.

Scenario

A 30-year-old male weighing 80kg (180cm tall) consumed:
- Beer (330ml, 5% ABV) 30 minutes ago on an empty stomach
- Beer (330ml, 5% ABV) 1 hour ago on an empty stomach

Instructions

  1. Make sure you've built the WASM package: ./build-wasm.sh web
  2. Serve this file with a local web server (required for WASM):
  3. Open http://localhost:8000/example.html in your browser
  4. Click the "Calculate BAC Example" button