Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Rust at the Dutch Electoral Council

Rust at the Dutch Electoral Council

Talk 'Rust at the Dutch Electoral Council' at the RustWeek Industry Track in Utrecht, The Netherlands on 13 May 2025.

Avatar for Mark Janssen

Mark Janssen

May 13, 2025
Tweet

More Decks by Mark Janssen

Other Decks in Programming

Transcript

  1. About me Mark Janssen github.com/praseody0 t Self-employe& t Lead Developer

    / Software Architect the Dutch Electoral Council (Kiesraadf t Developing software for 20+ yeare t MSc Embedded Systems, BSc Computer Science & Engineering 2
  2. Agenda ) Elections in The Netherland1 ) Dutch Electoral Counci3

    ) Software for election results: Abacu1 ) Rust and our development process 3
  3. Scale of the election process House of Representatives election: C

    10M voters C 100K volunteers C 10K polling stations C 342 municipal polling committe C 20 electoral district polling committee C 1 central polling committee Software is needed to add everything up! 6
  4. Electoral Council 9 Determines election result$ 9 Provides advice and

    suppor6 9 Provisions tool$ 9 Toolbox for paper proces$ 9 Software 7
  5. Abacus E Software for election result& E In-house greenfield development,

    started end of 202 E Double entry of polling station result& E Calculates totals for municipality, district, countrÈ E Runs decentralised (for each polling committee7 E No internet connection (airgapped) 9
  6. Overzicht GSB 045 Juinen - Gemeenteraadsverkiezing 2026 Sam Kuijpers (invoerder)

    Afmelden 418 Fluisterbosdreef 8 1e invoer Invoer afbreken 16 Is er herteld? Aantal kiezers en stemmen Verschillen Lijst 1 - Vurige Vleugels Partij Lijst 2 - Wijzen van Water en Wind Lijst 3 - Eeuwenoude Aarde Unie Lijst 4 - Verbond van Licht en L¸¾ Lijst 5 - Nieuwe Horizon Beweging Lijst 6 - VRG Lijst 7 - Harmonie van Hemel eå¾ Lijst 8 - Stralende Sterren Alliantie Lijst 9 - Tijdloze Toekomst Partij Lijst 10 - Kosmische Kracht CoalR¾ Lijst 11 - Magische Melodieën BeW¾ Lijst 12 - Zilveren Zonnestralen Px¾ Controleren en opslaan Lijst 1 - Vurige Vleugels Partij Nummer 1 2 3 4 5 6 7 8 9 10 Aantal stemmen 128 57 63 28 12 — — — — 4 Kandidaat Zilverlicht, E. (Eldor) Donderbrul, G. (Grom) Fluisterwind, S. (Seraphina) Nachtschaduw, V. (Vesper) Stormvleugel, R. (Ravian) Sterrenzwerver, M. (Mirella) Maanfluisteraar, X . (Xander) Windzanger, P. (Paxton) Vuurvlinder, F. (Faelia) Rotsbreker, H. (Helga) 10
  7. 11 GSB 045 Juinen - Gemeenteraadsverkiezing 2026 Mohammed van der

    Velden (coördinator) Afmelden Eerste zitting Steminvoer bezig Schorsen Afronden Statusoverzicht steminvoer Bezwaren en bijzondernehden Presentielijst Stembureaus Stembureaus per status Fouten en waarschuwingen (5) Niet afgeronde invoer (5) In onderzoek (3) Invoer bezig (6) Eerste invoer klaar (5) Eerste en tweede invoer klaar (123) Werkvoorraad (154) Voortgang Invoer met fouten en waarschuwingen (5) Te controleren Verschil 1e en 2e invoer Controleer 2 waarschuwingen Controleer 1 waarschuwing Beoordeel bezwaren en bijzonderheden Verschil 1e en 2e invoer Stembureau Schoolstraat 78 2e invoer Fluisterbosdreef 8 1e invoer Beatrixstraat 19 1e invoer Zonnebloemstraat 18 Nachthemelstraat 21 2e invoer 15 16 47 132 341 Nummer Niet afgeronde invoer (3) Stembureau Schoolstraat 78 2e invoer Fluisterbosdreef 8 1e invoer 132 341 Nummer Invoerder 18 Sara van Houten 21 Leila de Jong
  8. Database (SQLite) Abacus Backend REST API Abacus Abacus Frontend Users

    The frontend is the web application used by the users. Built in TypeScript+React. The backend is the server application that contains the logic of the system. Built in Rust. The database manages the storage of the system's data. SQLite has been chosen. Architecture 12
  9. apportionment Seat allocation authentication Login, authorization, and user management data_entry

    Input of polling station results. election Management of election data eml Import and export of files in EML_NL (XML) format pdf_gen Export of files in PDF format polling_station Export of files in PDF format report API to create PDF, EML_NL, and ZIP files summary Calculating the total election results audit_log Tracking and displaying audit events Backend architecture Abacus Backend Abacus Frontend 13
  10. Why Rust? A Open source (required by election law! A

    Memory-saf) A Strictly typed with a modern type syste A Great tooling (Cargo A Cross-platform suppor A Easy to deploy: compile to single executable 14
  11. Development process and tools m Open source on GitHub: https://github.com/kiesraad/abacuP

    m EU Public License (EUPL) 1.a m Contributions welcome2 m GitHub Actions for CC m Static analysis (linting) using Clippy from day t m Codecov for test coveragi m Playwright for end-to-end testinƒ m Test environments using Etes: https://abacus-test.nS m https://github.com/tweedegolf/eteP m Integrated with GitHub PRP m Figma for UX design 15
  12. Crates G Axum web framework (Tokio stack)3 G Utoipa for

    OpenAP G sqlx for databasD G Typst for PDF generatio" G quick-xml for XML import/expor0 G Serde for serializing and deserializin G .. and some other (smaller) crates 16
  13. Rust 1+ year in: takeaways Y Productiv@ Y Attractive language

    to hire senior developer1 Y Medior developers able to learn RusR Y Ecosystem has crates for almost everythinC Y Stable, although many crates only have 0.x release1 Y Crates for e.g. XML are lacking compared to other language1 Y Limited availability of third party code quality and architecture toolinC Y Would definitely choose Rust again! 17