Here is a quick mock-up of type safe interfaces in C. This was inspired by a StackOverflow post, specifically this answer: https://stackoverflow.com/a/6305160
There are some improvements, like a wrapper around the void* version of functions, which help keep track of which function expects which object.
The main.c
file contains example usage of the interface.
TODO: Comprehensive instructions for running test cases, running code, etc.