Twine is a trusted runtime that allows WebAssembly applications to execute securely within Intel SGX enclaves on untrusted cloud infrastructure. It addresses challenges of interfacing WebAssembly with hardware security modules and optimizing performance. Evaluations show Twine can execute SQLite compiled to WebAssembly within SGX enclaves with overhead of only 2.5-6.5x compared to native execution. Twine shields user applications while allowing them to be deployed across programming languages and hardware security environments.