Setup Emscripten and then run the following command in the src/Snake directory:
emcc --bind -o ./public/index.js snake.cc food.cc snake_body_part.cc character_batch.cc random.cc snake_game.cc -s ASYNCIFY
Now you should have index.js and index.wasm in the src/Snake/public directory. To be able to play the game you need a web server to serve the static files inside this folder.