锈加载程序— Webpack锈加载程序(wasm)-Rust开发

时间:2021-05-27 19:55:04
【文件属性】:
文件名称:锈加载程序— Webpack锈加载程序(wasm)-Rust开发
文件大小:99KB
文件格式:ZIP
更新时间:2021-05-27 19:55:04
Rust Build system 现在该项目处于低维护状态,而使用WasmPack代替Webpack Rust loader用于Rust的Webpack loader示例add.rs#[no_mangle] pub fn add(a:i32,b:现在该项目处于低维护性,使用WasmPack代替Webpack Rust loader Webpack loader对于Rust示例add.rs#[no_mangle] pub fn add(a:i32,b:i32)-> i32 {a + b} huge_crate / Cargo.toml [lib] crate-type = [“ cdylib”]#重要的huge_crate /src/lib.rs fn its_magic_number(x:i32)-> bool {x == 42}#[no_mangle] pub fn plus_one(x:i32)-> i32 {如果its_magic_number(x){420}否则{x + 1}} main.js从“ ./add.rs”导入添加从“ ./hu”导入hugeCrate
【文件预览】:
rust-loader-master
----.eslintrc.json(42B)
----loader.js(3KB)
----yarn.lock(233KB)
----spawn.js(588B)
----.npmignore(77B)
----test()
--------_build.js(538B)
--------rust()
--------index.js(1KB)
----LICENSE.md(1KB)
----README.md(2KB)
----.editorconfig(166B)
----.gitignore(50B)
----package.json(631B)

网友评论