This has been done / implemented several times but still seems like a worthwhile didactic exercise, esp. for grounding concepts and understanding of information theory more concretely (as well as optionally for learning new languages, e.g. by implementing whatever algorithm devised in Rust).
- Kinkelin/WordleCompetition - Everything you need for implementing AIs for the game Wordle
- Can you beat me at WORDPL? - Ted is writing things