This repository was archived by the owner on Mar 2, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 49
Fill out examples #16
Merged
Merged
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
307c8d1
Add READMEs and comments for examples
fitzgen daa23fe
Move `Render` to a private submodule
fitzgen 197915d
Deny missing docs and missing `Debug` implementations
fitzgen 25dcb1c
Only build examples as cdylib
fitzgen 5837d53
Fix a bug where "volatile" attributes weren't getting properly updated
fitzgen 0ac0e9d
Add an example TodoMVC implementation
fitzgen 96fcf33
Build with LTO
fitzgen e967d2e
Update the lockfile
fitzgen 91b7b60
Bump `bumpalo` dependency (ha)
fitzgen 9f533a4
Use inline tables for dependencies in TodoMVC's Cargo.toml
fitzgen 13de5e6
Use unpkg to get TodoMVC's CSS
fitzgen 24743b9
TodoMVC: Use an RAII type to auto render and save to local storage
fitzgen 2271ad4
Make sure we specify the latest version of all dependencies in our `C…
fitzgen 1e3cf1f
TodoMVC: use `?` instead of unwrapping in `run` start function
fitzgen 320d7d9
Use 'todo' instead of 'TODO' for comments in TodoMVC
fitzgen df5dadf
TodoMVC: add small note about why we `forget` in the router
fitzgen b179f91
Fix doc tests
fitzgen File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,19 +5,19 @@ authors = ["Nick Fitzgerald <[email protected]>"] | |
edition = "2018" | ||
|
||
[lib] | ||
crate-type = ["cdylib", "rlib"] | ||
crate-type = ["cdylib"] | ||
|
||
[features] | ||
|
||
[dependencies] | ||
console_error_panic_hook = "0.1.1" | ||
console_error_panic_hook = "0.1.5" | ||
console_log = "0.1.2" | ||
dodrio = { path = "../.." } | ||
log = "0.4.6" | ||
wasm-bindgen = "0.2" | ||
wasm-bindgen = "0.2.34" | ||
|
||
[dependencies.web-sys] | ||
version = "0.3.8" | ||
version = "0.3.11" | ||
features = [ | ||
"console", | ||
"Document", | ||
|
@@ -30,4 +30,4 @@ features = [ | |
] | ||
|
||
[dev-dependencies] | ||
wasm-bindgen-test = "0.2" | ||
wasm-bindgen-test = "0.2.34" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,21 @@ | ||
# 🦀🕸 `rust-webpack-template` | ||
# Counter | ||
|
||
> **Kickstart your Rust, WebAssembly, and Webpack project!** | ||
A counter that can be incremented and decremented. | ||
|
||
This template is designed for creating monorepo-style Web applications with | ||
Rust-generated WebAssembly and Webpack without publishing your wasm to NPM. | ||
## Source | ||
|
||
* Want to create and publish NPM packages with Rust and WebAssembly? [Check out | ||
`wasm-pack-template`.](https://github.com/rustwasm/wasm-pack-template) | ||
See `src/lib.rs`. | ||
|
||
## 🔋 Batteries Included | ||
## Build | ||
|
||
This template comes pre-configured with all the boilerplate for compiling Rust | ||
to WebAssembly and hooking into a Webpack build pipeline. | ||
|
||
* `npm run start` -- Serve the project locally for development at | ||
`http://localhost:8080`. | ||
|
||
* `npm run build` -- Bundle the project (in production mode). | ||
|
||
## 🚴 Using This Template | ||
``` | ||
wasm-pack build --target no-modules | ||
``` | ||
|
||
First, [install `wasm-pack`!](https://rustwasm.github.io/wasm-pack/installer/) | ||
## Serve | ||
|
||
Then, use `npm init` to clone this template: | ||
Use any HTTP server, for example: | ||
|
||
```sh | ||
npm init rust-webpack my-app | ||
``` | ||
python -m SimpleHTTPServer | ||
``` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,17 +5,17 @@ authors = ["Nick Fitzgerald <[email protected]>"] | |
edition = "2018" | ||
|
||
[lib] | ||
crate-type = ["cdylib", "rlib"] | ||
crate-type = ["cdylib"] | ||
|
||
[features] | ||
|
||
[dependencies] | ||
dodrio = { path = "../.." } | ||
wasm-bindgen = "0.2" | ||
console_error_panic_hook = "0.1.1" | ||
wasm-bindgen = "0.2.34" | ||
console_error_panic_hook = "0.1.5" | ||
|
||
[dependencies.web-sys] | ||
version = "0.3.8" | ||
version = "0.3.11" | ||
features = [ | ||
"Document", | ||
"HtmlElement", | ||
|
@@ -24,4 +24,4 @@ features = [ | |
] | ||
|
||
[dev-dependencies] | ||
wasm-bindgen-test = "0.2" | ||
wasm-bindgen-test = "0.2.34" |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not for long!