mirror of
https://github.com/rustwasm/wasm-bindgen.git
synced 2024-12-15 21:02:10 +03:00
32c611d16d
This commit migrates all our examples to using `wasm-pack build` to compile their code and run `wasm-bindgen`. This should make it a bit easier to understand the examples as there's less to follow during the build step. Webpack projects are all using `@wasm-tool/wasm-pack-plugin` as well so the build step is simple `npm run serve`. Other examples which retain `build.sh` are just using `wasm-pack build` now
13 lines
385 B
JavaScript
13 lines
385 B
JavaScript
const rust = import('./pkg/fetch');
|
|
|
|
rust
|
|
.then(m => {
|
|
return m.run().then((data) => {
|
|
console.log(data);
|
|
|
|
console.log("The latest commit to the wasm-bindgen %s branch is:", data.name);
|
|
console.log("%s, authored by %s <%s>", data.commit.sha, data.commit.commit.author.name, data.commit.commit.author.email);
|
|
})
|
|
})
|
|
.catch(console.error);
|