-
Notifications
You must be signed in to change notification settings - Fork 569
Wasm support #759
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Wasm support #759
Changes from 1 commit
Commits
Show all changes
45 commits
Select commit
Hold shift + click to select a range
19c186f
Add wasm backend + fix std::time dep
elrnv 30d66ba
Disable simple logger on wasm
elrnv cfb3627
Fix resizing in wasm backends
elrnv fbce712
Added scrolling support + fixed hidpi handling
elrnv 999ef45
Use explicit lifetime in StrOrChar
elrnv 8ee237f
Added keyboard support on wasm
elrnv 659e136
Fix browser zooming issue for web backend
elrnv 4658a17
Fix a typo causing the web build to break
elrnv 439b319
Format with cargo fmt
elrnv 85f400b
Prevent the browser from going back on backspace
elrnv 3316120
Fix key text + require console_log + adjust style
elrnv e2d8e00
Run rustfmt on stepper.rs
elrnv 204230c
Fix up console_log dependency
elrnv c191012
Add wasm build to ci
elrnv 844cbc2
Update ci by running wasm-pack explicitly
elrnv a37c3b4
Add druid/examples/wasm to workspace toml
elrnv 2d67cd7
Address format and clippy warnings
elrnv 481b796
Add wasm32 tests for druid & druid-shell in ci.yml
elrnv 9b2a3d8
Fix build.rs in druid-wasm-examples
elrnv fbd6073
Fix windows build for druid-wasm-examples
elrnv 23424af
Added simple_logger dep for wasm
elrnv 510a60a
Remove invald cfg feature guard
elrnv e7e257c
Unwrap from examples that return result
elrnv cfe5153
Run rustfmt on build.rs for druid-wasm-examples
elrnv 4b6150d
Address clippy concerns in druid examples
elrnv 5609e38
Fix the build script for wasm examples
elrnv 5ed32cb
Add .gitignore to wasm examples + fix clippy bugs
elrnv ad3c7e8
Update README.md formatting in druid wasm examples
elrnv d101869
Revert accidental change to build.rs
elrnv 8d05b09
Fix examples for wasm
elrnv ea81ffe
Fix x11 keycodes StrOrChar conversion
elrnv 78b4631
Rustfmt on recent changes to examples
elrnv 3cd4144
Fix clippy warnings -- small structs passed by ref
elrnv 1dbb4e9
Fix wasm build for multiwin example
elrnv 2102f82
Add --no-run to `cargo test` for wasm targets
elrnv 5021017
Do not build the unit test module for wasm32
elrnv a143692
Install necessary deps in wasm CI for macos/ubuntu
elrnv e0949ff
Add warnings for unimplemented file ops in web backend
elrnv 0df38af
Remove windows specific comment from web/window.rs
elrnv 5f64d4b
Ignore automatically generated html files in wasm example
elrnv ee88c7f
Remove unused dialog module from web backend
elrnv ea79c84
Remove TODO for adding to app state in web backend
elrnv e072555
Rework the generated examples in the wasm example
elrnv d0bc9df
Update Cargo.lock
elrnv 3a528fa
Rename switch example js entry point for wasm build
elrnv 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
Added simple_logger dep for wasm
This allows the wasm examples to build even when the target arch is not wasm32.
- Loading branch information
commit 23424afcca72749775c1874a568f8e657d782990
There are no files selected for viewing
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 |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| [package] | ||
| name = "druid-wasm-examples" | ||
| version = "0.1.0" | ||
| license = "Apache-2.0" | ||
| description = "Wasm scaffolding for druid examples" | ||
| repository = "https://github.com/xi-editor/druid" | ||
| edition = "2018" | ||
| publish = false | ||
|
|
||
| [lib] | ||
| crate-type = ["cdylib", "rlib"] | ||
|
|
||
| [dependencies] | ||
| druid = { path="../.."} | ||
| wasm-bindgen = "0.2.60" | ||
| console_error_panic_hook = { version = "0.1.6" } | ||
| log = "0.4.8" | ||
| instant = { version = "0.1", features = [ "wasm-bindgen" ] } | ||
|
|
||
| [target.'cfg(not(target_arch="wasm32"))'.dependencies] | ||
| simple_logger = { version = "1.6.0", default-features = false } | ||
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.
Uh oh!
There was an error while loading. Please reload this page.