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

Scaling up Rust development at the Dutch Electo...

Avatar for Mark Janssen Mark Janssen
May 19, 2026
4

Scaling up Rust development at the Dutch Electoral Council

RustWeek 2026 Industry Track talk "Scaling up Rust development at the Dutch Electoral Council"

Avatar for Mark Janssen

Mark Janssen

May 19, 2026

Transcript

  1. Scaling up Rust development at the Dutch Electoral Council Mark

    Janssen RustWeek Industry Track, 19 May 2026
  2. 2 About me Mark Janssen github.com/praseodym • Self-employed • Lead

    Developer / Software Architect for Abacus at the Dutch Electoral Council (Kiesraad) • Developing software for 20+ years • MSc Embedded Systems and BSc Computer Science & Engineering, TU Delft
  3. 3 Agenda • The Dutch Electoral Council (Kiesraad) • Elections

    in The Netherlands • Election results software: Abacus • Candidate nomination software: e-KS • Rust crate for election data exchange
  4. 4 Dutch Electoral Council (Kiesraad) • Determines election results •

    Provides advice and support • Provisions tools ‣ Toolbox for paper process ‣ Software (why we are here!)
  5. 5

  6. 6 High-level overview of an election Candidate nomination Voting Results

    & apportionment Nomination day Political parties submit candidate lists Public committee session Final tallied result and seat allocation presented Election day Voters cast ballots, counted by hand
  7. 9 Scale of the election process House of Representatives election:

    • 10M voters • 100K volunteers • 10K polling stations • 342 municipal electoral committees • 20 electoral district electoral committees • 1 central electoral committee Software is used to add up all results!
  8. 11

  9. 12

  10. 13

  11. 15 Why Rust? • Open source (required by election law!)

    • Memory-safe • Strictly typed with a modern type system • Great tooling (Cargo) • Cross-platform support • Easy to deploy: compile to single executable • High performance and low system requirements
  12. 16 Modelling apportionment law as Rust types /// Records the

    list and specific change for a specific residual seat #[derive(Clone, Debug, PartialEq)] pub enum SeatChange<LN> { HighestAverageAssignment(HighestAverageAssignedSeat<LN>), UniqueHighestAverageAssignment(HighestAverageAssignedSeat<LN>), LargestRemainderAssignment(LargestRemainderAssignedSeat<LN>), AbsoluteMajorityReassignment(AbsoluteMajorityReassignedSeat<LN>), ListExhaustionRemoval(ListExhaustionRemovedSeat<LN>), } Compiler enforces that every seat change (allocation or removal) has a legal basis.
  13. 17 Abacus during the 2026 municipal elections • Abacus v1.0.1

    used in 14 municipal elections • Used for entry of polling station results, summation, reporting, corrections • Preliminary evaluation is very positive! • Runtime performance is amazing: fast with low CPU/RAM usage Amersfoort Amersfoort Doetinchem Doetinchem Epe Epe Groningen Groningen Leiden Leiden Ooststellingwerf Ooststellingwerf Purmerend Purmerend 's-Hertogenbosch 's-Hertogenbosch Stichtse Vecht Stichtse Vecht Tynaarlo Tynaarlo Tytsjerksteradiel Tytsjerksteradiel Utrecht Utrecht Westland Westland Zoetermeer Zoetermeer
  14. 18 Lessons learned • Pivoted architecture from domain-driven to layered

    • Split major functionality into separate crates • Many great crates available (e.g. Typst), but also lower quality and unmaintained ones: choose carefully • Had more issues with React development than Rust
  15. 19 Next steps for Abacus • Make improvements based on

    user feedback • Implement remaining features (e.g. apportionment) • Next up: ‣ Municipal reorganisation election in November 2026 ‣ Provincial council and water board elections in March 2027
  16. 20 Scaling up Rust: candidate nomination • Software used by

    political parties to nominate candidates • Currently a paper process with offline software • Desire to move to digital process (requires new law) • After good experience writing Rust for Abacus, decided to use Rust again • Possibility to have a future single Rust software maintenance team • Public tender in 2025
  17. 21 e-KS • Implementation by a team from Tweede Golf

    • Centrally hosted web application, not air-gapped like Abacus • Mission critical in period up to election nomination date • Integration with Basisregistratie Personen (Personal Records Database) • Authentication with DigiD and eHerkenning • Single Rust-native codebase (with HTML, CSS and some JavaScript) • Also open source: github.com/kiesraad/e-ks
  18. 22

  19. 23 Election data exchange: EML_NL • Extensible Markup Language (XML)

    • OASIS standard: Election Markup Language (EML) • EML_NL dialect • Used for candidate nomination, candidate lists, election results • Open standard: github.com/kiesraad/EML_NL <?xml version="1.0" encoding="UTF-8"?> <EML Id="510b" SchemaVersion="5" xmlns=[..]> [..] <Count> <EventIdentifier/> <Election> <ElectionIdentifier Id="GR2026_Tynaarlo"> <ElectionName>Gemeenteraad Tynaarlo 2026</ElectionName> [..] <kr:ElectionDate>2026-03-18</kr:ElectionDate> </ElectionIdentifier> <Contests> <Contest> [..] <TotalVotes> <Selection> <AffiliationIdentifier Id="1"> <RegisteredName>LEEFBAAR GEMEENTEBELANGEN</ RegisteredName> </AffiliationIdentifier> <ValidVotes>2323</ValidVotes>
  20. 24 Rust crate for EML_NL • Foundational Rust crate •

    Parse, manipulate and emit EML_NL documents • Built on the quick-xml crate • Source on github.com/kiesraad/rust-eml-nl • Available on crates.io/crates/eml-nl • Round-trip preservation: use eml_nl::{documents::EML, io::{EMLRead, EMLWrite}}; let xml = "eml110b_polling_stations_construction_output.eml.xml"; let eml_doc = EML::parse_eml(xml, eml_nl::io::EMLParsingMode::Strict)?; let xml_output = eml_doc.write_eml_root_str(true, true)?; assert_eq!(xml_output, xml);
  21. 25 RustWeek Hackathon Come hack with us at the RustWeek

    Hackathon this Thursday! Register online: https://2026.rustweek.org/events/hackathon/