Skip to content

Commit

Permalink
Disable wasm-opt for all the entry point crates (#3734)
Browse files Browse the repository at this point in the history
This PR disables the wasm-opt optimization in the crates that can be used as WASM entry points. Unfortunately, wasm-pack does not allow for disabling wasm-opt through a command line flag, so we have to disable it by setting an appropriate flag in each Cargo.toml.
  • Loading branch information
mwu-tow authored Sep 23, 2022
1 parent a3de3c6 commit 6a56ceb
Show file tree
Hide file tree
Showing 23 changed files with 92 additions and 0 deletions.
4 changes: 4 additions & 0 deletions app/gui/language/span-tree/example/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,7 @@ uuid = { version = "0.8", features = ["serde", "v4", "wasm-bindgen"] }
[dependencies.web-sys]
version = "0.3.4"
features = []

# Stop wasm-pack from running wasm-opt, because we run it from our build scripts in order to customize options.
[package.metadata.wasm-pack.profile.release]
wasm-opt = false
4 changes: 4 additions & 0 deletions app/gui/view/debug_scene/component-group/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,7 @@ ensogl-list-view = { path = "../../../../../lib/rust/ensogl/component/list-view"
ensogl-text-msdf = { path = "../../../../../lib/rust/ensogl/component/text/src/font/msdf" }
ide-view-component-group = { path = "../../component-browser/component-group" }
wasm-bindgen = { version = "0.2.78", features = ["nightly"] }

# Stop wasm-pack from running wasm-opt, because we run it from our build scripts in order to customize options.
[package.metadata.wasm-pack.profile.release]
wasm-opt = false
4 changes: 4 additions & 0 deletions app/gui/view/debug_scene/component-list-panel-view/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,7 @@ ide-view-component-group = { path = "../../component-browser/component-group" }
ide-view-component-list-panel = { path = "../../component-browser/searcher-list-panel" }
wasm-bindgen = { version = "0.2.78", features = ["nightly"] }
js-sys = { version = "0.3" }

# Stop wasm-pack from running wasm-opt, because we run it from our build scripts in order to customize options.
[package.metadata.wasm-pack.profile.release]
wasm-opt = false
4 changes: 4 additions & 0 deletions app/gui/view/debug_scene/interface/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,7 @@ parser = { path = "../../../language/parser" }
span-tree = { path = "../../../language/span-tree" }
uuid = { version = "0.8", features = ["v4", "wasm-bindgen"] }
wasm-bindgen = { version = "0.2.78", features = ["nightly"] }

# Stop wasm-pack from running wasm-opt, because we run it from our build scripts in order to customize options.
[package.metadata.wasm-pack.profile.release]
wasm-opt = false
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,7 @@ ide-view-component-group = { path = "../../component-browser/component-group" }
ide-view-component-list-panel = { path = "../../component-browser/searcher-list-panel" }
wasm-bindgen = { version = "0.2.78", features = ["nightly"] }
js-sys = { version = "0.3" }

# Stop wasm-pack from running wasm-opt, because we run it from our build scripts in order to customize options.
[package.metadata.wasm-pack.profile.release]
wasm-opt = false
4 changes: 4 additions & 0 deletions app/gui/view/debug_scene/visualization/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,7 @@ js-sys = { version = "0.3.28" }
nalgebra = { version = "0.26.1" }
serde_json = { version = "1.0" }
wasm-bindgen = { version = "0.2.78", features = ["nightly"] }

# Stop wasm-pack from running wasm-opt, because we run it from our build scripts in order to customize options.
[package.metadata.wasm-pack.profile.release]
wasm-opt = false
4 changes: 4 additions & 0 deletions lib/rust/ensogl/example/animation/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,7 @@ ensogl-core = { path = "../../core" }
ensogl-text-msdf = { path = "../../component/text/src/font/msdf" }
enso-prelude = { path = "../../../prelude" }
wasm-bindgen = { version = "0.2.78", features = ["nightly"] }

# Stop wasm-pack from running wasm-opt, because we run it from our build scripts in order to customize options.
[package.metadata.wasm-pack.profile.release]
wasm-opt = false
4 changes: 4 additions & 0 deletions lib/rust/ensogl/example/complex-shape-system/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,7 @@ crate-type = ["cdylib", "rlib"]
[dependencies]
ensogl-core = { path = "../../core" }
wasm-bindgen = { version = "0.2.78", features = ["nightly"] }

# Stop wasm-pack from running wasm-opt, because we run it from our build scripts in order to customize options.
[package.metadata.wasm-pack.profile.release]
wasm-opt = false
4 changes: 4 additions & 0 deletions lib/rust/ensogl/example/custom-shape-system/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,7 @@ ensogl-core = { path = "../../core" }
enso-frp = { path = "../../../frp" }
wasm-bindgen = { version = "0.2.78", features = ["nightly"] }
enso-profiler = { path = "../../../profiler" }

# Stop wasm-pack from running wasm-opt, because we run it from our build scripts in order to customize options.
[package.metadata.wasm-pack.profile.release]
wasm-opt = false
4 changes: 4 additions & 0 deletions lib/rust/ensogl/example/dom-symbols/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,7 @@ crate-type = ["cdylib", "rlib"]
ensogl-core = { path = "../../core" }
wasm-bindgen = { version = "0.2.78", features = ["nightly"] }
nalgebra = { version = "0.26.1" }

# Stop wasm-pack from running wasm-opt, because we run it from our build scripts in order to customize options.
[package.metadata.wasm-pack.profile.release]
wasm-opt = false
4 changes: 4 additions & 0 deletions lib/rust/ensogl/example/drop-manager/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,7 @@ ensogl-drop-manager = { path = "../../component/drop-manager" }
enso-prelude = { path = "../../../prelude" }
wasm-bindgen = { version = "0.2.78", features = ["nightly"] }
wasm-bindgen-futures = { version = "0.4.8" }

# Stop wasm-pack from running wasm-opt, because we run it from our build scripts in order to customize options.
[package.metadata.wasm-pack.profile.release]
wasm-opt = false
4 changes: 4 additions & 0 deletions lib/rust/ensogl/example/easing-animator/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,7 @@ wasm-bindgen = { version = "0.2.78", features = ["nightly"] }
js-sys = { version = "0.3.28" }
nalgebra = { version = "0.26.1" }
web-sys = { version = "0.3.4" }

# Stop wasm-pack from running wasm-opt, because we run it from our build scripts in order to customize options.
[package.metadata.wasm-pack.profile.release]
wasm-opt = false
4 changes: 4 additions & 0 deletions lib/rust/ensogl/example/glyph-system/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,7 @@ ensogl-text = { path = "../../component/text" }
ensogl-text-embedded-fonts = { path = "../../component/text/src/font/embedded" }
ensogl-text-msdf = { path = "../../component/text/src/font/msdf" }
wasm-bindgen = { version = "0.2.78", features = ["nightly"] }

# Stop wasm-pack from running wasm-opt, because we run it from our build scripts in order to customize options.
[package.metadata.wasm-pack.profile.release]
wasm-opt = false
4 changes: 4 additions & 0 deletions lib/rust/ensogl/example/grid-view/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,7 @@ ensogl-text-msdf = { path = "../../component/text/src/font/msdf" }
enso-text = { path = "../../../text" }
wasm-bindgen = { version = "0.2.78", features = ["nightly"] }
itertools = "0.10.3"

# Stop wasm-pack from running wasm-opt, because we run it from our build scripts in order to customize options.
[package.metadata.wasm-pack.profile.release]
wasm-opt = false
4 changes: 4 additions & 0 deletions lib/rust/ensogl/example/list-view/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,7 @@ ensogl-list-view = { path = "../../component/list-view" }
ensogl-text-msdf = { path = "../../component/text/src/font/msdf" }
enso-text = { path = "../../../text" }
wasm-bindgen = { version = "0.2.78", features = ["nightly"] }

# Stop wasm-pack from running wasm-opt, because we run it from our build scripts in order to customize options.
[package.metadata.wasm-pack.profile.release]
wasm-opt = false
4 changes: 4 additions & 0 deletions lib/rust/ensogl/example/mouse-events/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,7 @@ enso-frp = { path = "../../../frp" }
ensogl-core = { path = "../../core" }
ensogl-text-msdf = { path = "../../component/text/src/font/msdf" }
wasm-bindgen = { version = "0.2.78", features = ["nightly"] }

# Stop wasm-pack from running wasm-opt, because we run it from our build scripts in order to customize options.
[package.metadata.wasm-pack.profile.release]
wasm-opt = false
4 changes: 4 additions & 0 deletions lib/rust/ensogl/example/profiling-run-graph/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,7 @@ features = [
'Response',
'Window',
]

# Stop wasm-pack from running wasm-opt, because we run it from our build scripts in order to customize options.
[package.metadata.wasm-pack.profile.release]
wasm-opt = false
4 changes: 4 additions & 0 deletions lib/rust/ensogl/example/scroll-area/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,7 @@ ensogl-hardcoded-theme = { path = "../../app/theme/hardcoded" }
ensogl-scroll-area = { path = "../../component/scroll-area" }
ensogl-text-msdf = { path = "../../component/text/src/font/msdf" }
wasm-bindgen = { version = "0.2.78", features = ["nightly"] }

# Stop wasm-pack from running wasm-opt, because we run it from our build scripts in order to customize options.
[package.metadata.wasm-pack.profile.release]
wasm-opt = false
4 changes: 4 additions & 0 deletions lib/rust/ensogl/example/shape-system/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,7 @@ crate-type = ["cdylib", "rlib"]
ensogl-core = { path = "../../core" }
wasm-bindgen = { version = "0.2.78", features = ["nightly"] }
enso-profiler = { path = "../../../profiler" }

# Stop wasm-pack from running wasm-opt, because we run it from our build scripts in order to customize options.
[package.metadata.wasm-pack.profile.release]
wasm-opt = false
4 changes: 4 additions & 0 deletions lib/rust/ensogl/example/slider/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,7 @@ ensogl-hardcoded-theme = { path = "../../app/theme/hardcoded" }
ensogl-text-msdf = { path = "../../component/text/src/font/msdf" }
ensogl-selector = { path = "../../component/selector" }
wasm-bindgen = { version = "0.2.78", features = ["nightly"] }

# Stop wasm-pack from running wasm-opt, because we run it from our build scripts in order to customize options.
[package.metadata.wasm-pack.profile.release]
wasm-opt = false
4 changes: 4 additions & 0 deletions lib/rust/ensogl/example/sprite-system-benchmark/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,7 @@ crate-type = ["cdylib", "rlib"]
ensogl-core = { path = "../../core" }
nalgebra = { version = "0.26.1" }
wasm-bindgen = { version = "0.2.78", features = ["nightly"] }

# Stop wasm-pack from running wasm-opt, because we run it from our build scripts in order to customize options.
[package.metadata.wasm-pack.profile.release]
wasm-opt = false
4 changes: 4 additions & 0 deletions lib/rust/ensogl/example/sprite-system/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,7 @@ crate-type = ["cdylib", "rlib"]
ensogl-core = { path = "../../core" }
enso-web = { path = "../../../web" }
wasm-bindgen = { version = "0.2.78", features = ["nightly"] }

# Stop wasm-pack from running wasm-opt, because we run it from our build scripts in order to customize options.
[package.metadata.wasm-pack.profile.release]
wasm-opt = false
4 changes: 4 additions & 0 deletions lib/rust/shortcuts/example/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,7 @@ js-sys = { version = "0.3.28" }
[dependencies.web-sys]
version = "0.3.4"
features = []

# Stop wasm-pack from running wasm-opt, because we run it from our build scripts in order to customize options.
[package.metadata.wasm-pack.profile.release]
wasm-opt = false

0 comments on commit 6a56ceb

Please sign in to comment.