mirror of
https://github.com/fluencelabs/wasm-bindgen
synced 2025-06-25 02:31:35 +00:00
Build examples and deploy to gh-pages
Rejigger Travis slightly to take advantage of build stages to build the `gh-pages` branch amongst a set of builders, and then when they're all done we synchronize and deploy the site. For now use S3 as a backing store for data between jobs.
This commit is contained in:
@ -1,7 +1,8 @@
|
||||
# 2D Canvas
|
||||
|
||||
[View full source code][code]
|
||||
[View full source code][code] or [view the compiled example online][online]
|
||||
|
||||
[online]: https://rustwasm.github.io/wasm-bindgen/exbuild/canvas/
|
||||
[code]: https://github.com/rustwasm/wasm-bindgen/tree/master/examples/canvas
|
||||
|
||||
Drawing a smiley face with the 2D canvas API. This is a port of part of [this
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 3.7 KiB After Width: | Height: | Size: 3.7 KiB |
@ -1,7 +1,8 @@
|
||||
# Small wasm files
|
||||
|
||||
[View full source code][code]
|
||||
[View full source code][code] or [view the compiled example online][online]
|
||||
|
||||
[online]: https://rustwasm.github.io/wasm-bindgen/exbuild/add/
|
||||
[code]: https://github.com/rustwasm/wasm-bindgen/tree/master/examples/add
|
||||
|
||||
One of `wasm-bindgen`'s core goals is a pay-only-for-what-you-use philosophy, so
|
||||
|
@ -1,7 +1,8 @@
|
||||
# Working with the `char` type
|
||||
|
||||
[View full source code][code]
|
||||
[View full source code][code] or [view the compiled example online][online]
|
||||
|
||||
[online]: https://rustwasm.github.io/wasm-bindgen/exbuild/char/
|
||||
[code]: https://github.com/rustwasm/wasm-bindgen/tree/master/examples/char
|
||||
|
||||
The `#[wasm_bindgen]` macro will convert the rust `char` type to a single
|
||||
|
@ -1,7 +1,8 @@
|
||||
# web-sys: Closures
|
||||
|
||||
[View full source code][code]
|
||||
[View full source code][code] or [view the compiled example online][online]
|
||||
|
||||
[online]: https://rustwasm.github.io/wasm-bindgen/exbuild/closures/
|
||||
[code]: https://github.com/rustwasm/wasm-bindgen/tree/master/examples/closures
|
||||
|
||||
One of the features of `#[wasm_bindgen]` is that you can pass closures defined
|
||||
|
@ -1,7 +1,8 @@
|
||||
# `console.log`
|
||||
|
||||
[View full source code][code]
|
||||
[View full source code][code] or [view the compiled example online][online]
|
||||
|
||||
[online]: https://rustwasm.github.io/wasm-bindgen/exbuild/console_log/
|
||||
[code]: https://github.com/rustwasm/wasm-bindgen/tree/master/examples/console_log
|
||||
|
||||
This example shows off how to use `console.log` in a variety of ways, all the
|
||||
|
@ -1,7 +1,8 @@
|
||||
# web-sys: DOM hello world
|
||||
|
||||
[View full source code][code]
|
||||
[View full source code][code] or [view the compiled example online][online]
|
||||
|
||||
[online]: https://rustwasm.github.io/wasm-bindgen/exbuild/dom/
|
||||
[code]: https://github.com/rustwasm/wasm-bindgen/tree/master/examples/dom
|
||||
|
||||
Using `web-sys` we're able to interact with all the standard web platform
|
||||
|
@ -1,7 +1,8 @@
|
||||
# The `fetch` API
|
||||
|
||||
[View full source code][code]
|
||||
[View full source code][code] or [view the compiled example online][online]
|
||||
|
||||
[online]: https://rustwasm.github.io/wasm-bindgen/exbuild/fetch/
|
||||
[code]: https://github.com/rustwasm/wasm-bindgen/tree/master/examples/fetch
|
||||
|
||||
This example uses the `fetch` API to make an HTTP request to the GitHub API and
|
||||
|
@ -1,7 +1,8 @@
|
||||
# Hello, World!
|
||||
|
||||
[View full source code][code]
|
||||
[View full source code][code] or [view the compiled example online][online]
|
||||
|
||||
[online]: https://rustwasm.github.io/wasm-bindgen/exbuild/hello_world/
|
||||
[code]: https://github.com/rustwasm/wasm-bindgen/tree/master/examples/hello_world
|
||||
|
||||
This is the "Hello, world!" example of `#[wasm_bindgen]` showing how to set up
|
||||
|
@ -1,7 +1,8 @@
|
||||
# Importing non-browser JS
|
||||
|
||||
[View full source code][code]
|
||||
[View full source code][code] or [view the compiled example online][online]
|
||||
|
||||
[online]: https://rustwasm.github.io/wasm-bindgen/exbuild/import_js/
|
||||
[code]: https://github.com/rustwasm/wasm-bindgen/tree/master/examples/import_js
|
||||
|
||||
The `#[wasm_bindgen]` attribute can be used on `extern { .. }` blocks to import
|
||||
|
@ -1,7 +1,8 @@
|
||||
# Julia Set
|
||||
|
||||
[View full source code][code]
|
||||
[View full source code][code] or [view the compiled example online][online]
|
||||
|
||||
[online]: https://rustwasm.github.io/wasm-bindgen/exbuild/julia_set/
|
||||
[code]: https://github.com/rustwasm/wasm-bindgen/tree/master/examples/julia_set
|
||||
|
||||
While not showing off a lot of `web_sys` API surface area, this example shows a
|
||||
|
@ -1,7 +1,8 @@
|
||||
# Paint Example
|
||||
|
||||
[View full source code][code]
|
||||
[View full source code][code] or [view the compiled example online][online]
|
||||
|
||||
[online]: https://rustwasm.github.io/wasm-bindgen/exbuild/paint/
|
||||
[code]: https://github.com/rustwasm/wasm-bindgen/tree/master/examples/paint
|
||||
|
||||
A simple painting program.
|
||||
|
@ -1,7 +1,8 @@
|
||||
# web-sys: `performance.now`
|
||||
|
||||
[View full source code][code]
|
||||
[View full source code][code] or [view the compiled example online][online]
|
||||
|
||||
[online]: https://rustwasm.github.io/wasm-bindgen/exbuild/performance/
|
||||
[code]: https://github.com/rustwasm/wasm-bindgen/tree/master/examples/performance
|
||||
|
||||
Want to profile some Rust code in the browser? No problem! You can use the
|
||||
|
@ -1,7 +1,8 @@
|
||||
# js-sys: WebAssembly in WebAssembly
|
||||
|
||||
[View full source code][code]
|
||||
[View full source code][code] or [view the compiled example online][online]
|
||||
|
||||
[online]: https://rustwasm.github.io/wasm-bindgen/exbuild/wasm-in-wasm/
|
||||
[code]: https://github.com/rustwasm/wasm-bindgen/tree/master/examples/wasm-in-wasm
|
||||
|
||||
Using the `js-sys` crate we can get pretty meta and instantiate `WebAssembly`
|
||||
|
@ -1,7 +1,8 @@
|
||||
# WebAudio
|
||||
|
||||
[View full source code][code]
|
||||
[View full source code][code] or [view the compiled example online][online]
|
||||
|
||||
[online]: https://rustwasm.github.io/wasm-bindgen/exbuild/webaudio/
|
||||
[code]: https://github.com/rustwasm/wasm-bindgen/tree/master/examples/webaudio
|
||||
|
||||
This example creates an [FM
|
||||
|
@ -1,7 +1,8 @@
|
||||
# WebGL Example
|
||||
|
||||
[View full source code][code]
|
||||
[View full source code][code] or [view the compiled example online][online]
|
||||
|
||||
[online]: https://rustwasm.github.io/wasm-bindgen/exbuild/webgl/
|
||||
[code]: https://github.com/rustwasm/wasm-bindgen/tree/master/examples/webgl
|
||||
|
||||
This example draws a triangle to the screen using the WebGL API.
|
||||
|
Reference in New Issue
Block a user