Develop the Android Context Hub Runtime Environment (CHRE) Nanoapps in WebAssembly
Talkat WasmCon 2023 · on Wednesday, 2023-09-06· at 16:30· Grand Ballroom E, Hyatt Regency Bellevue, 900 Bellevue Way NE·
summary
Project compiles unmodified CHRE nanoapps to WebAssembly using Wasm Micro Runtime (WAMR), preserving CHRE lifecycle and enabling interop with native nanoapps via a one-to-one wrapper per nanoapp that copies events into linear memory and maps nested C structs using static_assert checks. Runtime supports interpreter/JIT/AOT modes, runs on MCUs with a few hundred KB RAM, adds roughly ~300 KB memory increase and delivers about 2–11% runtime overhead in prototypes, proving a practical migration path while highlighting the cost of wrappers versus a native Wasm-native CHRE design.
AI-written summary · about
chapters (16)
- 0:00CHRE and Nanoapps intro
- 1:46What is CHRE
- 3:10Why CHRE exists
- 4:55Nanoapp ecosystem challenges
- 5:59WebAssembly for Nanoapps
- 7:01CHRE on WebAssembly goals
- 8:25Why WAMR
- 10:12How Nanoapps work
- 12:00Moving Nanoapps to WASM
- 14:09Data structure solutions
- 16:47Event handling in WASM
- 19:03CHRE on WASM architecture
- 20:12Live WASM Nanoapp demos
- 21:16Memory and performance impact
- 21:58Project learnings and future
- 24:10Q&A
related talks
31mAndroid's CHRE and Open Source Frameworks
36mSafety-Critical Meets Web-Native: Wasm Revolutionizes Embedded Systems
27mNative Web Apps: React and WebAssembly to Rewrite Native Apps
30mBeyond Web-Apps: React, JavaScript and WebAssembly To Port Legacy Native Apps
32mWhat WebAssembly means for React
55mUsing WebAssembly to run, extend, and secure your .NET application
22mCreate an Extensible Cloud Native Application with WebAssembly
32mMeet Chicory, exploit the power of WebAssembly on the server side!
