September 2018
Intermediate to advanced
328 pages
9h 10m
English
Create a file named index.html in the /compile-with-llvm directory and populate it with the following contents:
<!doctype html><html lang="en-us"><head> <title>LLVM Test</title></head><body> <h1>LLVM Test</h1> <canvas id="myCanvas" width="255" height="255"></canvas> <div style="margin-top: 16px;"> <button id="actionButton" style="width: 100px; height: 24px;"> Pause </button> </div> <script type="application/javascript"> const canvas = document.querySelector('#myCanvas'); const ctx = canvas.getContext('2d'); const importObj = { env: { memoryBase: 0, tableBase: 0, memory: new WebAssembly.Memory({ initial: 256 }), table: new WebAssembly.Table({ initial: 8, element: 'anyfunc' }), abort: console.log, jsFillRect: function(x, y, w, ...Read now
Unlock full access