跳转到内容

能力自动生成

Kernel 在 requires { … } 中声明的能力。Kernel 只能通过声明并被授予的能力接触机器。文件读写、剪贴板等由 Host 用 --allow 控制,不属于 Kernel 能力,详见能力与安全。

名称 简述 需要此能力的内置函数
field.read 读取绑定到输入端口的 Field 的元素和尺寸(包括图片)。 at, fetch, at_linear, sample, count, size, isize
field.write 创建并写入输出 Field(包括图片)。 put, emit
input.read 读取指针、按钮、按键、手柄、滚轮,以及窗口像素尺寸与缩放。 window, scale, pointer, pointer_down, button, stick, wheel, pads, key, typed
time.read 读取会话时钟与声音采样率。 time, clock, rate, queued