Skip to content
Draft
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
68 changes: 2 additions & 66 deletions compiler/base/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,6 @@ version = "=0.3.56"
package = "base64"
version = "=0.13.0"

[dependencies.bincode]
package = "bincode"
version = "=1.3.1"

[dependencies.bit_set]
package = "bit-set"
version = "=0.5.2"
Expand All @@ -93,10 +89,6 @@ version = "=1.2.1"
package = "block-buffer"
version = "=0.9.0"

[dependencies.boolinator]
package = "boolinator"
version = "=2.4.0"

[dependencies.bstr]
package = "bstr"
version = "=0.2.15"
Expand Down Expand Up @@ -126,10 +118,6 @@ version = "=1.0.0"
package = "cfg-if"
version = "=0.1.10"

[dependencies.cfg_match]
package = "cfg-match"
version = "=0.2.1"

[dependencies.chrono]
package = "chrono"
version = "=0.4.19"
Expand All @@ -143,10 +131,6 @@ version = "=2.33.3"
package = "color_quant"
version = "=1.1.0"

[dependencies.console_error_panic_hook]
package = "console_error_panic_hook"
version = "=0.1.6"

[dependencies.const_fn]
package = "const_fn"
version = "=0.4.5"
Expand Down Expand Up @@ -336,26 +320,6 @@ version = "=0.23.0"
package = "glob"
version = "=0.3.0"

[dependencies.gloo]
package = "gloo"
version = "=0.2.1"

[dependencies.gloo_console_timer]
package = "gloo-console-timer"
version = "=0.1.0"

[dependencies.gloo_events]
package = "gloo-events"
version = "=0.1.1"

[dependencies.gloo_file]
package = "gloo-file"
version = "=0.1.0"

[dependencies.gloo_timers]
package = "gloo-timers"
version = "=0.2.1"

[dependencies.h2]
package = "h2"
version = "=0.3.1"
Expand Down Expand Up @@ -879,7 +843,7 @@ version = "=0.4.0"

[dependencies.siphasher]
package = "siphasher"
version = "=0.3.5"
version = "=0.3.3"

[dependencies.slab]
package = "slab"
Expand Down Expand Up @@ -1115,7 +1079,7 @@ version = "=0.8.2"

[dependencies.version_check]
package = "version_check"
version = "=0.9.3"
version = "=0.9.2"

[dependencies.walkdir]
package = "walkdir"
Expand All @@ -1125,34 +1089,6 @@ version = "=2.3.1"
package = "want"
version = "=0.3.0"

[dependencies.wasm_bindgen]
package = "wasm-bindgen"
version = "=0.2.72"

[dependencies.wasm_bindgen_backend]
package = "wasm-bindgen-backend"
version = "=0.2.72"

[dependencies.wasm_bindgen_futures]
package = "wasm-bindgen-futures"
version = "=0.4.22"

[dependencies.wasm_bindgen_macro]
package = "wasm-bindgen-macro"
version = "=0.2.72"

[dependencies.wasm_bindgen_macro_support]
package = "wasm-bindgen-macro-support"
version = "=0.2.72"

[dependencies.wasm_bindgen_shared]
package = "wasm-bindgen-shared"
version = "=0.2.72"

[dependencies.web_sys]
package = "web-sys"
version = "=0.3.49"

[dependencies.weezl]
package = "weezl"
version = "=0.1.4"
Expand Down
104 changes: 2 additions & 102 deletions compiler/base/crate-information.json
Original file line number Diff line number Diff line change
Expand Up @@ -79,11 +79,6 @@
"version": "0.13.0",
"id": "base64"
},
{
"name": "bincode",
"version": "1.3.1",
"id": "bincode"
},
{
"name": "bit-set",
"version": "0.5.2",
Expand All @@ -104,21 +99,11 @@
"version": "0.9.0",
"id": "block_buffer"
},
{
"name": "boolinator",
"version": "2.4.0",
"id": "boolinator"
},
{
"name": "bstr",
"version": "0.2.15",
"id": "bstr"
},
{
"name": "bumpalo",
"version": "3.6.1",
"id": "bumpalo"
},
{
"name": "bytemuck",
"version": "1.5.1",
Expand Down Expand Up @@ -149,11 +134,6 @@
"version": "0.1.10",
"id": "cfg_if_0_1_10"
},
{
"name": "cfg-match",
"version": "0.2.1",
"id": "cfg_match"
},
{
"name": "chrono",
"version": "0.4.19",
Expand All @@ -169,11 +149,6 @@
"version": "1.1.0",
"id": "color_quant"
},
{
"name": "console_error_panic_hook",
"version": "0.1.6",
"id": "console_error_panic_hook"
},
{
"name": "const_fn",
"version": "0.4.5",
Expand Down Expand Up @@ -404,31 +379,6 @@
"version": "0.3.0",
"id": "glob"
},
{
"name": "gloo",
"version": "0.2.1",
"id": "gloo"
},
{
"name": "gloo-console-timer",
"version": "0.1.0",
"id": "gloo_console_timer"
},
{
"name": "gloo-events",
"version": "0.1.1",
"id": "gloo_events"
},
{
"name": "gloo-file",
"version": "0.1.0",
"id": "gloo_file"
},
{
"name": "gloo-timers",
"version": "0.2.1",
"id": "gloo_timers"
},
{
"name": "h2",
"version": "0.3.1",
Expand Down Expand Up @@ -534,11 +484,6 @@
"version": "0.1.22",
"id": "jpeg_decoder"
},
{
"name": "js-sys",
"version": "0.3.49",
"id": "js_sys"
},
{
"name": "lazy_static",
"version": "1.4.0",
Expand Down Expand Up @@ -1081,7 +1026,7 @@
},
{
"name": "siphasher",
"version": "0.3.5",
"version": "0.3.3",
"id": "siphasher"
},
{
Expand Down Expand Up @@ -1371,7 +1316,7 @@
},
{
"name": "version_check",
"version": "0.9.3",
"version": "0.9.2",
"id": "version_check"
},
{
Expand All @@ -1384,41 +1329,6 @@
"version": "0.3.0",
"id": "want"
},
{
"name": "wasm-bindgen",
"version": "0.2.72",
"id": "wasm_bindgen"
},
{
"name": "wasm-bindgen-backend",
"version": "0.2.72",
"id": "wasm_bindgen_backend"
},
{
"name": "wasm-bindgen-futures",
"version": "0.4.22",
"id": "wasm_bindgen_futures"
},
{
"name": "wasm-bindgen-macro",
"version": "0.2.72",
"id": "wasm_bindgen_macro"
},
{
"name": "wasm-bindgen-macro-support",
"version": "0.2.72",
"id": "wasm_bindgen_macro_support"
},
{
"name": "wasm-bindgen-shared",
"version": "0.2.72",
"id": "wasm_bindgen_shared"
},
{
"name": "web-sys",
"version": "0.3.49",
"id": "web_sys"
},
{
"name": "weezl",
"version": "0.1.4",
Expand All @@ -1443,15 +1353,5 @@
"name": "yaml-rust",
"version": "0.4.5",
"id": "yaml_rust"
},
{
"name": "yew",
"version": "0.17.4",
"id": "yew"
},
{
"name": "yew-macro",
"version": "0.17.0",
"id": "yew_macro"
}
]
5 changes: 0 additions & 5 deletions compiler/base/postinstall.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,8 @@ function install_wasm_gc() {
cargo install wasm-gc
}

function install_wasm_pack() {
curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
}

if [[ $1 == "nightly" ]]; then
(install_wasm_target)
(install_wasm2wat)
(install_wasm_gc)
(install_wasm_pack)
fi
15 changes: 3 additions & 12 deletions compiler/wasm-pack/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,17 +1,8 @@
[package]
authors = [
"Kelly Thomas Kline <[email protected]>",
"Samuel Rounce <[email protected]>"
]
categories = ["gui", "wasm", "web-programming"]
description = "yew-wasm-pack-minimal demonstrates the minimum code and tooling necessary for a frontend web app with simple deployable artifacts consisting of one HTML file, one JavaScript file, and one WebAssembly file, using Yew, wasm-bindgen, and wasm-pack."
edition = "2018"
keywords = ["yew", "wasm", "wasm-bindgen", "web"]
license = "MIT/Apache-2.0"
name = "yew-wasm-pack-minimal"
readme = "README.md"
repository = "https://github.com/yewstack/yew-wasm-pack-minimal"
name = "hello_world"
version = "0.1.0"
authors = ["The wasm-bindgen Developers"]
edition = "2018"

[lib]
crate-type = ["cdylib"]
Expand Down
15 changes: 9 additions & 6 deletions compiler/wasm-pack/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
# syntax = docker/dockerfile:experimental

FROM shepmaster/rust-nightly
# fetch dependencies to local
FROM shepmaster/rust-nightly as sources
RUN cargo install wasm-pack
ADD --chown=playground src/lib.rs /playground/src/lib.rs
# TODO support top 100 crates
ADD --chown=playground Cargo.toml /playground/Cargo.toml
RUN cargo vendor --no-delete --versioned-dirs ./cargo-deps > /playground/.cargo/config.toml \
&& wasm-pack build --target web --out-name package --dev \
&& wasm-pack build --target web --out-name package
RUN rm src/lib.rs
RUN cargo fetch

# build dependencies
FROM sources
RUN wasm-pack build --target web --out-name package --dev
RUN rm src/*.rs

ADD --chown=playground cargo-pack /playground/.cargo/bin/
ADD --chown=playground entrypoint.sh /playground/tools/
ENTRYPOINT ["/playground/tools/entrypoint.sh"]
3 changes: 2 additions & 1 deletion compiler/wasm-pack/cargo-pack
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ while (( "$#" )); do

shift
done

# Greatly inspired from https://gitlab.com/strwrite/seed-playground
# --dev flag disables the wasm-opt for optimization downloaded from networks
wasm-pack build --target web --out-name package --dev

cat pkg/package_bg.wasm | base64 > "${output}.wasm"
Expand Down
11 changes: 0 additions & 11 deletions compiler/wasm-pack/entrypoint.sh

This file was deleted.

2 changes: 1 addition & 1 deletion top-crates/crate-modifications.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
exclusions = []

additions = ["web-sys", "wasm-bindgen", "yew"]
additions = []
Loading