npm.io
0.8.3 • Published 2 years agoCLI

waft

Licence
ISC
Version
0.8.3
Deps
9
Size
2.8 MB
Vulns
0
Weekly
0

Waft

v0.7.x
Waft是基于WebAssembly的AIoT应用开发框架。

安装

npm install waft

cli快速开始

npm install waft-cli -g
waft init
cd my-project
waft start

文档

waft开发者文档

示例

<template>
  <div class="container">
    <text class="hello-font">Hello World</text>
  </div>
</template>
<script>
import { JSON } from 'waft-json';
import { genie, window } from 'waft';
export function HelloWaft(): void{
  window.setState(JSON.parseObject(`{
    "title": "powered by waft",
    "from": "Tmall Genie"
  }`));
  window.onshow = (): void =>{
    genie.playTTS('我在,你说', true);
  }
}
</script>