#secret #name #who #last #filename #pair #file

app secret-santa-rs

Generator for who buys for who in a secret santa

8 stable releases

1.2.3 Sep 18, 2023
1.2.2 Apr 3, 2023
1.2.1 Oct 16, 2022
1.0.2 Jul 30, 2022

#422 in Development tools

Download history 2/week @ 2024-02-23 1/week @ 2024-03-01 93/week @ 2024-03-08 15/week @ 2024-03-15 6/week @ 2024-03-29

114 downloads per month


196 lines



  • Install cargo.
  • Run cargo install secret-santa-rs.


  • Create the file names.txt containing names.
    • Example file contents:
      John Smith
      Liam Anderson
      Emma Jones
  • Run secret-santa-rs in the directory containing the names file. The program will output a list of who buys for who. People with the same last name will not be paired with each other.
  • If the program cannot find a valid pair for someone, it will output None (e.g. "Bob buys for None"). In some cases, running the program again will resolve this issue due to different randomness.


~41K SLoC