AIUI 0.21 features and performance improvements
Release overview
AIUI lets an agent on Rokid glasses answer with cards, buttons, and charts. A weekend hiking assistant, for example, can help users check where to meet before they set out and see how much elevation they gain on different parts of the trail.
AIUI 0.21 includes built-in address lookup and system navigation, so an app can show a readable address for the meeting point's coordinates and open walking directions from the card. For an elevation chart that frequently recalculates and redraws, developers can use Offload to reduce the work each refresh takes.
This release also speeds up large-page updates and local storage operations and simplifies reading text as it arrives over the network. The article closes with the aiui-dev coding benchmark and how five models performed on the same AIUI development tasks.
Built-in address lookup and system navigation
To turn meeting point coordinates into a readable address and open directions from a card, developers typically had to integrate a third-party mapping service. That meant writing the lookup, formatting the returned address, and wiring up a way to open directions. AIUI 0.21 builds both capabilities into the framework, so apps can call its address lookup and system navigation APIs directly.
Show a readable address on the card
If the organizer shares only latitude and longitude, pass the two numbers to Geocoder. The function below returns a line of text for the card. It returns the address when it finds one and the original coordinates when there is no match or the lookup fails.
async function getMeetingPointLabel(latitude, longitude) { const coordinates = `${latitude}, ${longitude}`; const geocoder = new Geocoder({ level: 'city', acceptLanguages: ['en-US'] }); try { const address = await geocoder.getFromLocation(latitude, longitude); return address?.formattedAddress ?? coordinates; } catch (error) { return coordinates; } } console.log(await getMeetingPointLabel(30.2741, 120.1551)); Use level: 'city' for a name such as Hangzhou. Change it to 'street' to request a street-level address. The level of detail depends on the environment and service coverage. Looking up supplied coordinates requires no device location permission. Look up addresses
Open walking directions when the user taps
Bind onNavigateTap below to the card's Walking directions button. When the user taps it, navigator.maps.navigate() passes the full address confirmed by the organizer to system navigation.
async function onNavigateTap() { try { await navigator.maps.navigate({ destination: { type: 'address', address: 'West Lake Scenic Area, Hangzhou, Zhejiang, China' }, travelMode: 'walking' }); } catch (error) { console.log('Could not open walking directions'); } } System navigation plans a route from the user's current location and asks for permission if needed. If the group is meeting at a particular entrance, pass the full address of that entrance so the directions lead to the meeting point. Open system navigation
Use Offload to reduce the cost of redrawing the elevation chart
The chart refreshes as the user drags it. If the current view has hundreds of bars, each refresh needs to read a batch of numbers, calculate the height of each bar, and draw them. When that work takes too long, the chart can lag behind the gesture.
Offload can speed up this kind of repeated work. Put the loop inside a class method and add @offload above the method. AIUI checks the method when it reads the TypeScript source. When a call is eligible, the runtime uses native code to execute the whole loop, reducing the overhead of processing each item in JavaScript. For example, you can turn a batch of trail segment measurements into bar heights or handle a batch of rectangle drawing commands in one call. The call stays synchronous, so the page waits for it to finish. If AIUI cannot accelerate the call, it runs the original JavaScript by default.
A short loop may run faster directly because preparing an accelerated call takes time. Start with frequently called loops that handle plenty of data each time, then compare both versions with real inputs.
Try adding up selected elevation gains
Start with three numbers. Three segments gain 1, 3, and 5 meters of elevation, respectively. If you pick segments that gain more than 2 meters, the result is the sum of the last two, or 8 meters. The example below marks the sumAbove() method with @offload.
In an AIUI 0.21 environment that supports Offload, open a practice project you can preview and replace pages/index/index.ink with the following. Create and preview your first AIUI project
<script setup lang="ts"> import { offload } from 'ink:compiler'; class ElevationStats { @offload static sumAbove(values: Float64Array, threshold: number): number { let total = 0; for (let i = 0; i < values.length; i++) { if (values[i] > threshold) { total += values[i]; } } return total; } } export default { data: { total: ElevationStats.sumAbove(new Float64Array([1, 3, 5]), 2) } }; </script> <page> <view><text>Elevation gain from matching segments: {{ total }} m</text></view> </page> Preview the home page again. It should show Elevation gain from matching segments: 8 m. Change the threshold passed to ElevationStats.sumAbove() from 2 to 3 and preview again. The result should be 5 m because > only includes values strictly above the cutoff. A Float64Array is an array designed to store numbers. The static keyword lets you call the method directly on the class. Keep lang="ts" so AIUI can recognize @offload in the TypeScript source. Offload guide
Draw a batch of bars in one call
Use the same elevation gains to draw a chart. Mark the drawing method with @offload, then pass it the canvas drawing context and the whole batch of data. At 12 pixels per meter, [1, 3, 5] gives three bars that are 12, 36, and 60 pixels tall. Each fillRect() call draws one solid bar. Using baseline - height keeps the bottoms aligned.
import { offload } from 'ink:compiler'; class ElevationChart { @offload drawBars(ctx: InkCanvasRenderingContext2D, gains: Float32Array, baseline: number): void { for (let i = 0; i < gains.length; i++) { const height = gains[i] * 12; ctx.fillRect(4 + i * 16, baseline - height, 10, height); } } } const canvas = new Canvas(56, 72); const ctx = canvas.getContext('2d'); ctx.fillStyle = '#33aa66'; new ElevationChart().drawBars(ctx, new Float32Array([1, 3, 5]), 64); This TypeScript example draws onto an offscreen canvas, a surface the app can draw on without displaying it directly. In the chart, pass the batch of data currently in view to drawBars() on each refresh. If you pass the drawing context of a <canvas> on the page, call ctx.flush() after drawing to submit the result for display. Draw with Canvas
Benchmark results on Rokid Glasses
The benchmark runs the same loop to draw 4,096 bars on a pair of Rokid Glasses. With @offload, the median time to submit the drawing commands drops from 19.97 ms to 0.76 ms, a speedup of about 26.3×. When the benchmark waits for drawing to finish and reads back one pixel synchronously, the median drops from 29.27 ms to 2.43 ms, a speedup of about 12.0×.
This test used one pair of Rokid Glasses (RG-glasses2) running AIUI 0.21.0-rc.20261120182853. Both versions used identical inputs and offscreen canvases of the same size. The benchmark alternated which version went first, ran 12 warm-up pairs, then recorded 61 paired measurements and took the median for each version. It also checked that the pixel outputs matched. The Offload version ran in require mode to verify that it used the accelerated path. The chart measures offscreen drawing. Measure gesture-to-display latency in the actual page.
Check whether it runs faster on the glasses
Three numbers are enough to check the answer. To see how much time the app saves, compare both versions on the glasses with a realistic amount of data.
- Check that the call can be accelerated. In either example, change
@offloadto@offload({ mode: 'require' })and try your real inputs. An unsupported method body causes a compilation error. If the inputs prevent acceleration, the call throwsOffloadUnsupportedError. Switch back to the default form before timing the behavior users will encounter. - Time the same batch of data. Put the same loop in two methods and mark one with
@offload. First check that both produce the same result. Then callperformance.now()before and after each call and subtract to get the elapsed milliseconds. Run each version a few times first, then repeat the measurements and compare the middle value for each one. Time code with the Performance API - Drag the chart on the glasses. Use real data on the target glasses. Check both the time spent in the drawing call and how well the screen keeps up with the gesture. You can time the call and drawing completion separately, as in the chart above, then watch what the user sees.
Faster updates on large pages and faster local storage
Imagine a list of trails where each entry has a map, a difficulty rating, and places to resupply. Most of those details stay collapsed until the user expands an entry, which triggers a data update. In the 0.21 test with a large amount of hidden content, processing a page data update took nearly 90% less time. That figure measures the data update step. To find out how long opening a trail entry takes on the glasses, measure from the tap until the details appear. 0.21 runtime performance results
Apps also use local storage for preferences such as distance units or the last trail selected. In the 0.21 tests, repeated reads of saved data took about 99% less time. In a series of consecutive writes, the write calls took about 90% less time. That test measured until each write call returned. Flushing the changes to storage takes additional time. The gains in an app depend on how often it reads and writes, its data, and the device. Use local storage
Read text as it arrives and handle interruptions
A hiking assistant can display “North entrance open” as soon as it arrives and append “Water on the summit trail” when the server sends the next part. Reading chunks from response.body gives you bytes, so the app has to decode them with TextDecoder and handle characters whose bytes are split across chunks. In 0.21, textStream() yields decoded text directly, so the loop can focus on updating the card. Read streaming text over HTTPS
async function readTrailNotes(response, showText) { if (!response.ok) { throw new Error(`HTTP ${response.status}`); } let notes = ''; for await (const chunk of response.textStream()) { notes += chunk; showText(notes); } } Pass the response from fetch() and a display callback to readTrailNotes(). Each time a chunk arrives, showText() receives the complete text so far. The caller can use that callback to update the card and show a retry option if the request or stream fails.
If the user switches networks during a hike, the page may still appear online while an existing request or subscription drops. The page can watch for connection changes with onNetworkStatus and use request failures or connection close events to restore the operations it still needs. If the user cancels a pending wx.request(), calling abort() triggers fail and complete so the page can clear its waiting state. Network status events · Requests and cancellation
The aiui-dev coding benchmark
aiui-dev gives a coding assistant AIUI component guidance, API references, and design guidelines for the glasses. The AIUI Coding Benchmark gives the assistant a requirement and a starting project, then grades the code it produces. For example, if a task asks for a reset button, the grader checks that it resets the counter to zero and that the existing count button still works. AIUI Skills
The top model passed 73 of 80 tasks in the latest run
As of December 4, 2026, the latest full run on the official leaderboard was the December 3 run. Five models each attempted the same 80 tasks and passed 346 of 400 evaluations overall, a pass rate of 86.5%. Here are the scores by model. Per-task report for the run
- GPT-6.1 Terra — 73/80 (91.25%)
- GPT-6.1 Sol — 71/80 (88.75%)
- DeepSeek Flash — 68/80 (85.00%)
- GPT-6 Luna — 68/80 (85.00%)
- DeepSeek V4 Flash — 66/80 (82.50%)
GPT-6.1 Terra passed every creation, migration, and platform constraint task, scoring 19/19, 7/7, and 4/4 in those categories. Design alignment was the hardest category in this run. The five models passed just 7 of 35 evaluations in that category. All five missed the first five design tasks, which check the monochrome green display guidelines. The passes came from adapting a Widget layout and preserving a full-color theme. Category scores and individual tasks
What the 80 tasks cover
The benchmark groups tasks into six categories and labels their difficulty. It contains 19 easy, 50 medium, and 11 hard tasks. The pass counts below combine results from all five models, so the number of evaluations in each category is five times its task count. Task catalog and grading details
- Create features (19 tasks, 88/95 passes). Build pages, cards, or background tasks. An example is creating a counter that can increment and reset.
- Modify features (21 tasks, 97/105 passes). Add to an existing project while preserving its behavior. For example, add live search and a Clear button while keeping the existing About action working.
- Fix problems (22 tasks, 104/110 passes). Repair state, events, retries, or resource cleanup. One task checks that an older search response cannot overwrite newer results if it arrives late.
- Migrate projects (7 tasks, 33/35 passes). Move a page or background task to current AIUI conventions while preserving its routes, data bindings, and interactions.
- Follow platform constraints (4 tasks, 17/20 passes). For example, declare the required location capability and use the AIUI location API.
- Follow design guidelines (7 tasks, 7/35 passes). For example, make the title, main reading, and metadata distinct on a monochrome green display card while keeping the Refresh button working.
The grader checks files and configuration, page structure and styles, and selected interaction logic. For the out-of-order search task, for example, it sends two responses in a specified order and checks the final page data. A task counts as passed when all requirement and regression checks pass and the solution follows the platform constraints. The results measure the code the models delivered on this run with the skill available. Rendering, visual quality, and the experience of interacting on glasses still need device testing. AIUI Coding Benchmark leaderboard
Read the full changelog
Version 0.21 also adds video to AI-generated cards, image resizing, and barcode positioning. Full AIUI 0.21.0 changelog



