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

  • 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!");
}
主站蜘蛛池模板: 阳朔县| 临颍县| 邵东县| 永昌县| 托克托县| 辽阳市| 文成县| 七台河市| 和田市| 郁南县| 禄丰县| 民勤县| 宜良县| 息烽县| 宁津县| 景宁| 甘德县| 忻城县| 平度市| 乌拉特中旗| 虹口区| 宝坻区| 金沙县| 宁德市| 鄂托克前旗| 台东市| 宜阳县| 广宁县| 抚松县| 崇左市| 华亭县| 兴化市| 饶平县| 双江| 巩义市| 乐安县| 黔江区| 金昌市| 彝良县| 商南县| 津南区|