Logo
Explore Help
Sign In
fluencelabs/wasm-bindgen
1
0
Fork 0
You've already forked wasm-bindgen
mirror of https://github.com/fluencelabs/wasm-bindgen synced 2025-05-08 20:12:16 +00:00
Code Issues Projects Releases Wiki Activity
wasm-bindgen/examples/hello_world/index.js

9 lines
266 B
JavaScript
Raw Normal View History

Add some comments to the hello-world example
2018-03-02 20:32:48 -08:00
// Note that a dynamic `import` statement here is required due to
chore: upgrade @wasm-tool/wasm-pack-plugin to 1.0.1
2019-08-27 18:18:38 +01:00
// webpack/webpack#6615, but in theory `import { greet } from './pkg';`
Add some comments to the hello-world example
2018-03-02 20:32:48 -08:00
// will work here one day as well!
chore: upgrade @wasm-tool/wasm-pack-plugin to 1.0.1
2019-08-27 18:18:38 +01:00
const rust = import('./pkg');
Rewrite the README using Webpack Right now Webpack probably has the most mature support for loading wasm modules, so let's show off how to do that! Additionally this commits hello world as an example to the repository.
2018-03-02 20:11:30 -08:00
Add `catch(console.error)` to all examples Some examples have been failing to load in some browsers, and this ensures that whenever the promise to load Rust code fails we log any errors happening instead of accidentally failing silently. This helped debug a bit in #897
2018-09-28 13:54:29 -07:00
rust
.then(m => m.greet('World!'))
.catch(console.error);
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.23.7 Page: 80ms Template: 2ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API