Start with this example which does work in vscode wokwi simulator. Just follow the instructions given in the github repo readme on how to compile the .c into .wasm and then run the simulator inside vscode.