官术网_书友最值得收藏!

  • Learn WebAssembly
  • Mike Rourke
  • 111字
  • 2021-08-13 15:38:49

Rust

C and C++ were intended to be the primary languages used for WebAssembly, but Rust is a perfectly suitable substitute. Rust is a systems programming language that is syntactically similar to C++. It was designed with memory safety in mind, but still retains the performance advantages of C and C++. The current nightly build of Rust's compiler can generate .wasm files from Rust source code, so if you prefer Rust and are familiar with C++, you should be able to use Rust for most of the examples in this book.

The following snippet demonstrates how to print Hello World! to the console using Rust:

fn main() {
println!("Hello World!");
}
主站蜘蛛池模板: 洞头县| 祁门县| 昌乐县| 定远县| 土默特左旗| 西乌珠穆沁旗| 孟州市| 平湖市| 公主岭市| 盐源县| 平湖市| 石棉县| 望奎县| 安溪县| 阳城县| 崇文区| 汉沽区| 科技| 英吉沙县| 高青县| 建始县| 三门县| 阿克陶县| 禄劝| 景谷| 广州市| 永吉县| 内江市| 宁南县| 彩票| 汉寿县| 大埔区| 锡林郭勒盟| 皮山县| 肇州县| 太康县| 塔河县| 渭南市| 沙坪坝区| 山西省| 株洲市|