hello_rust_wasm:使用Rust和WebAssembly进行开发

时间:2021-04-22 18:46:13
【文件属性】:
文件名称:hello_rust_wasm:使用Rust和WebAssembly进行开发
文件大小:1.03MB
文件格式:ZIP
更新时间:2021-04-22 18:46:13
Rust 编译NPM软件包(在pkg目录中) $ wasm-pack构建 使软件包对NPM可用(输出用Rust编写但编译为WASM的NPM软件包) $ cd pkg $ npm链接 在网络上使用该程序包 $ cd ../ .. $ mkdir站点$ cd站点$ npm链接hello-wasm 将程序包添加到package.json中的依赖项列表。 启动开发服务器(从站点目录) $ npm install $ npm运行服务 转到
【文件预览】:
hello_rust_wasm-main
----assets()
--------pieces.glb(978KB)
--------branding()
----src()
--------pieces.rs(4KB)
--------lib.rs(2KB)
----Cargo.toml(697B)
----site()
--------index.js(147B)
--------package.json(228B)
--------assets()
--------index.html(167B)
--------package-lock.json(186KB)
--------webpack.config.js(184B)
--------yarn.lock(154KB)
----.gitignore(38B)
----.cargo()
--------config(1KB)
----README.md(420B)

网友评论