Skip to content

Commit 3cf0e6e

Browse files
committed
Merge remote-tracking branch 'upstream/master' into split-wasm
2 parents bae2c3e + bb031eb commit 3cf0e6e

File tree

11 files changed

+35
-37
lines changed

11 files changed

+35
-37
lines changed

.cargo/config.toml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,3 @@ runner = 'wasmtime -W unknown-imports-trap=y'
66

77
[target.wasm32-unknown-unknown]
88
rustflags = ['--cfg', 'getrandom_backend="wasm_js"']
9-
10-
# This section needs to be last.
11-
# GitHub Actions modifies this section.
12-
[unstable]

.github/workflows/benchmark.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ jobs:
5757
5858
- name: Setup chrome
5959
id: setup-chrome
60-
uses: browser-actions/setup-chrome@v1
60+
uses: browser-actions/setup-chrome@v2
6161
with:
6262
install-chromedriver: true
6363

.github/workflows/size-cmp.yml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,15 @@ jobs:
3232

3333
- name: Write Optimisation Flags
3434
run: |
35-
echo 'build-std = ["std", "panic_abort"]' >> .cargo/config.toml
36-
echo 'build-std-features = ["panic_immediate_abort"]' >> .cargo/config.toml
37-
echo '[build]' >> .cargo/config.toml
38-
echo 'rustflags = ["-Cpanic=abort"]' >> .cargo/config.toml
35+
if [ -x ci/write-min-size-flags.sh ] ; then
36+
ci/write-min-size-flags.sh
37+
else
38+
# this branch is a fallback used only for compatibility with earlier commits
39+
# in the repository and other branches and can be removed in the future.
40+
echo 'build-std = ["std", "panic_abort"]' >> .cargo/config.toml
41+
echo '[build]' >> .cargo/config.toml
42+
echo 'rustflags = ["-Cpanic=abort"]' >> .cargo/config.toml
43+
fi
3944
4045
- name: Setup toolchain
4146
uses: dtolnay/rust-toolchain@master

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ members = [
44
"tools/*",
55
"examples/*",
66
]
7+
exclude = ["examples/.cargo"]
78
default-members = [
89
"packages/*",
910
]

ci/write-min-size-flags.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#!/usr/bin/env bash
2+
cat examples/.cargo/min-size-config.toml >> examples/.cargo/dummy-min-size-config.toml

examples/.cargo/config.toml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# this include is a bit of a hack: due to the unstable nature of the feature,
2+
# this file only gets included on nightly, hence it can specify "nightly only"
3+
# rustflags and options
4+
include = ["unstable.toml", "dummy-min-size-config.toml"]
5+
6+
[unstable]
7+
config-include = true
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# This file is intentionally left empty.
2+
# It gets filled by `min-size-config.toml` in some cases by CI
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
[unstable]
2+
build-std = ["core", "std", "panic_abort"]
3+
build-std-features = ["optimize_for_size"]
4+
5+
[target.'cfg(target_arch = "wasm32")']
6+
rustflags = ["-Zunstable-options", "-Cpanic=immediate-abort", "--cfg", "nightly_yew"]

examples/.cargo/unstable.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[target.wasm32-unknown-unknown]
2+
rustflags = ["--cfg", "nightly_yew"]

packages/yew/src/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
#![allow(clippy::needless_doctest_main)]
22
#![doc(html_logo_url = "https://yew.rs/img/logo.png")]
33
#![cfg_attr(documenting, feature(doc_cfg))]
4-
#![cfg_attr(documenting, feature(doc_auto_cfg))]
54
#![cfg_attr(nightly_yew, feature(fn_traits, unboxed_closures))]
65

76
//! # Yew Framework - API Documentation

0 commit comments

Comments
 (0)