-
Access JavaScript functions from Rust
In this tutorial, we will show you how to use the nodejs-helper crate to call Node.js functions from Rust code. Rust functions can now access the file system, network, database, and other system resources from within the WebAssembly container. It is important to note that a better way for Rust programs to access system resources is through the WebAssembly WASI extension, as well as numerous host extensions provided by the SSVM.…
-
WebAssembly in the browser
WebAssembly was originally invented as a technology solution to speed up code execution inside web browsers. It does not provide a full replacement for JavaScript, but rather works side-by-side with JavaScript. The idea is that JavaScript functions could pass computationally intensive tasks to WebAssembly functions. In this tutorial, we will demonstrate how a simple WebAssembly in-browser application works. The source code of the tutorial is here. A WebAssembly application typically has two parts.…
-
Rust and WebAssembly
In this tutorial, we will create a very simple but complete WebAssembly application. A WebAssembly application typically has two parts. The bytecode program that runs inside the WebAssembly virtual machine to perform computing tasks The host application that provides UI, networking, database, and calls the WebAssembly program to perform key computing tasks or business logic In this tutorial, the host application is written in JavaScript and runs inside a web browser.…
-
🚀 入门文档:在 Node.js 应用中调用 Rust 函数
服务端的 WebAssembly 有很多非常好的用例,尤其是在AI,区块链和大数据应用方面。这个入门教程展示了如何将用 Rust 编写的 WebAssembly 函数合并到服务器上的 Node.js 应用程序中。这…
RustWebAssemblyNode.jsgetting-startedrust-function-in-nodejs
-
🍹 树莓派上的高性能 Node.js 应用
树莓派(Raspberry Pi) 是一款功能强大的计算机,个头小巧。树莓派最便宜的机型是 Raspberry Pi Zero, 可以运行功能齐全的 Linux 发行版并驱动高清显示…
-
ssvmup build 为什么编译失败
[INFO]: Installing wasm-bindgen... thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Error { description: "Couldn\'t connect to server", code: 7, extra: None }', src/install/mod.rs:182:9 note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace Well, this is embarrassing. 当运行 ssvmup build ,报这样的错误时,多半是因为没有网络连接。ssvm…
-
ssvmup build 为什么编译失败
更新 ssvmup 失败,提示如下的信息,该如何设置 Docker image 里的 .cargo config 呢? [INFO]: Checking for the Wasm target... [INFO]: Compiling to Wasm...Finished release [optimized] target(s) in 0.52s [INFO]: Installing wasm-bindgen...thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Error { description: "Couldn\'t connect to server", code: 7, extra: None }', src/install/mod.rs:182:9note: run with `RUST_BACKTRACE=1`…