)]}'
{
  "commit": "2deecf3cb4cf607ecf115093cc855ab411b82502",
  "tree": "61b3de2b26ad0961eb2e597ed2d5f7da2cdbb43d",
  "parents": [
    "1b95a2f285ac8d44e44f06de322abf5b315495bd"
  ],
  "author": {
    "name": "Scott Todd",
    "email": "scotttodd@google.com",
    "time": "Fri Nov 18 13:06:13 2022 -0800"
  },
  "committer": {
    "name": "GitHub",
    "email": "noreply@github.com",
    "time": "Fri Nov 18 13:06:13 2022 -0800"
  },
  "message": "Initial iree_loop_t implementation for web browsers. (#11204)\n\nThis is the start of an implementation of the\r\n[`iree_loop_t`](https://github.com/iree-org/iree/blob/main/runtime/src/iree/base/loop.h)\r\ninterface (added back in https://github.com/iree-org/iree/pull/8329) for\r\nweb browsers, using `setTimeout()`, Promises, and other JavaScript APIs\r\nfor working with asynchronous operations and the browser event loop.\r\n\r\nThis only handles `IREE_LOOP_COMMAND_CALL` for now, but I\u0027d like some\r\nfeedback on the architecture / implementation style.\r\n\r\nSome details that were tricky to figure out:\r\n* This uses a JavaScript library that implements a C API:\r\nhttps://emscripten.org/docs/porting/connecting_cpp_and_javascript/Interacting-with-code.html#implement-a-c-api-in-javascript.\r\nWe may end up with a few of these.\r\n* The JavaScript library uses `dynCall_iiii` to call a provided C\r\nfunction pointer (I haven\u0027t found any dedicated documentation on this,\r\nso this was pieced together from reading through Emscripten\u0027s source\r\ncode)\r\n* A new `iree_link_js_library` CMake function was added to pass\r\n`--js-library` to `emcc` and set up the right dependency link between\r\n.js files and binaries (tests/applications/etc.). We can also use\r\n`--pre-js` and `--post-js` as needed.",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "2b81f59d6aec6394dfcf517e69625b1e66393e68",
      "old_mode": 33188,
      "old_path": "build_tools/cmake/iree_macros.cmake",
      "new_id": "3e909311a994e7577f61193ed8ee84416ca84a4d",
      "new_mode": 33188,
      "new_path": "build_tools/cmake/iree_macros.cmake"
    },
    {
      "type": "modify",
      "old_id": "2bdaf404542f5b8ec34e323aaa442faacc9a4cd3",
      "old_mode": 33188,
      "old_path": "runtime/src/iree/base/CMakeLists.txt",
      "new_id": "c962f95fa18db071b9634575dc187d015852c9cd",
      "new_mode": 33188,
      "new_path": "runtime/src/iree/base/CMakeLists.txt"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "8b4bd50d4dc59037ff9cc5a60a626159b51a194d",
      "new_mode": 33188,
      "new_path": "runtime/src/iree/base/loop_emscripten.c"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "4f8c6b7fc34d6ee1b37832bf37f641e48c61da44",
      "new_mode": 33188,
      "new_path": "runtime/src/iree/base/loop_emscripten.h"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "06190d35bb6a63028718f2fcbc3f701b6ddaa2b0",
      "new_mode": 33188,
      "new_path": "runtime/src/iree/base/loop_emscripten.js"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "3fe7f020b7bbeeff3fb8010497a2e12f29428f7f",
      "new_mode": 33188,
      "new_path": "runtime/src/iree/base/loop_emscripten_test.cc"
    }
  ]
}
