Skip to content

Commit f4176da

Browse files
authored
Use Taplo for TOML formatting (#4071)
1 parent 343af0e commit f4176da

File tree

65 files changed

+342
-382
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

65 files changed

+342
-382
lines changed

.cargo/config.toml

+9-9
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@ runner = 'cargo run -p wasm-bindgen-cli --bin wasm-bindgen-test-runner --'
33

44
[target.'cfg(all())']
55
rustflags = [
6-
"-Adead_code",
7-
"-Anon_upper_case_globals",
8-
"-Aunused_doc_comments",
9-
"-Aclippy::large_enum_variant",
10-
"-Aclippy::missing_safety_doc",
11-
"-Aclippy::new_without_default",
12-
"-Aclippy::overly_complex_bool_expr",
13-
"-Aclippy::too_many_arguments",
14-
"-Aclippy::type_complexity"
6+
"-Adead_code",
7+
"-Anon_upper_case_globals",
8+
"-Aunused_doc_comments",
9+
"-Aclippy::large_enum_variant",
10+
"-Aclippy::missing_safety_doc",
11+
"-Aclippy::new_without_default",
12+
"-Aclippy::overly_complex_bool_expr",
13+
"-Aclippy::too_many_arguments",
14+
"-Aclippy::type_complexity",
1515
]

.github/workflows/main.yml

+13
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,19 @@ jobs:
2929
- run: rustup update --no-self-update stable && rustup default stable
3030
- run: rustup component add rustfmt
3131
- run: cargo fmt --all -- --check
32+
33+
# Check TOML style by using Taplo.
34+
taplo:
35+
name: Taplo
36+
37+
runs-on: ubuntu-latest
38+
39+
steps:
40+
- uses: actions/checkout@v4
41+
- uses: taiki-e/install-action@v2
42+
with:
43+
tool: taplo-cli
44+
- run: taplo fmt --check
3245

3346
# Run `cargo check` over everything
3447
check:

Cargo.toml

+18-22
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
[package]
2-
name = "wasm-bindgen"
3-
version = "0.2.92"
42
authors = ["The wasm-bindgen Developers"]
5-
license = "MIT OR Apache-2.0"
6-
readme = "README.md"
73
categories = ["wasm"]
8-
repository = "https://github.com/rustwasm/wasm-bindgen"
9-
homepage = "https://rustwasm.github.io/"
10-
documentation = "https://docs.rs/wasm-bindgen"
114
description = """
125
Easy support for interacting between JS and Rust.
136
"""
7+
documentation = "https://docs.rs/wasm-bindgen"
148
edition = "2021"
15-
rust-version = "1.57"
9+
homepage = "https://rustwasm.github.io/"
1610
include = ["/build.rs", "/LICENSE-*", "/src"]
11+
license = "MIT OR Apache-2.0"
12+
name = "wasm-bindgen"
13+
readme = "README.md"
14+
repository = "https://github.com/rustwasm/wasm-bindgen"
15+
rust-version = "1.57"
16+
version = "0.2.92"
1717

1818
[package.metadata.docs.rs]
1919
features = ["serde-serialize"]
@@ -23,10 +23,10 @@ test = false
2323

2424
[features]
2525
default = ["spans", "std"]
26+
enable-interning = ["std"]
27+
serde-serialize = ["serde", "serde_json", "std"]
2628
spans = ["wasm-bindgen-macro/spans"]
2729
std = []
28-
serde-serialize = ["serde", "serde_json", "std"]
29-
enable-interning = ["std"]
3030

3131
# Whether or not the `#[wasm_bindgen]` macro is strict and generates an error on
3232
# all unused attributes
@@ -38,31 +38,28 @@ gg-alloc = ["wasm-bindgen-test/gg-alloc"]
3838

3939
# This is only for debugging wasm-bindgen! No stability guarantees, so enable
4040
# this at your own peril!
41-
xxx_debug_only_print_generated_code = [
42-
"wasm-bindgen-macro/xxx_debug_only_print_generated_code",
43-
]
41+
xxx_debug_only_print_generated_code = ["wasm-bindgen-macro/xxx_debug_only_print_generated_code"]
4442

4543
[dependencies]
44+
cfg-if = "1.0.0"
4645
once_cell = "1.12"
47-
wasm-bindgen-macro = { path = "crates/macro", version = "=0.2.92" }
4846
serde = { version = "1.0", optional = true }
4947
serde_json = { version = "1.0", optional = true }
50-
cfg-if = "1.0.0"
48+
wasm-bindgen-macro = { path = "crates/macro", version = "=0.2.92" }
5149

5250
[target.'cfg(target_arch = "wasm32")'.dev-dependencies]
5351
js-sys = { path = 'crates/js-sys' }
54-
wasm-bindgen-test = { path = 'crates/test' }
55-
wasm-bindgen-futures = { path = 'crates/futures' }
5652
serde_derive = "1.0"
53+
wasm-bindgen-futures = { path = 'crates/futures' }
54+
wasm-bindgen-test = { path = 'crates/test' }
5755
wasm-bindgen-test-crate-a = { path = 'tests/crates/a' }
5856
wasm-bindgen-test-crate-b = { path = 'tests/crates/b' }
5957

6058
[lints.rust]
61-
unexpected_cfgs = { level = "warn", check-cfg = [
62-
'cfg(wasm_bindgen_unstable_test_coverage)',
63-
] }
59+
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(wasm_bindgen_unstable_test_coverage)'] }
6460

6561
[workspace]
62+
exclude = ["crates/msrv"]
6663
members = [
6764
"benchmarks",
6865
"crates/cli",
@@ -108,11 +105,10 @@ members = [
108105
"examples/synchronous-instantiation",
109106
"tests/no-std",
110107
]
111-
exclude = ["crates/msrv"]
112108
resolver = "2"
113109

114110
[patch.crates-io]
111+
js-sys = { path = 'crates/js-sys' }
115112
wasm-bindgen = { path = '.' }
116113
wasm-bindgen-futures = { path = 'crates/futures' }
117-
js-sys = { path = 'crates/js-sys' }
118114
web-sys = { path = 'crates/web-sys' }

benchmarks/Cargo.toml

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
[package]
2-
name = "wasm-bindgen-benchmark"
3-
version = "0.0.0"
42
authors = ["The wasm-bindgen Developers"]
53
edition = "2021"
4+
name = "wasm-bindgen-benchmark"
65
publish = false
6+
version = "0.0.0"
77

88
[dependencies]
9+
js-sys = { path = '../crates/js-sys' }
910
wasm-bindgen = { path = '../' }
1011
web-sys = { path = '../crates/web-sys', features = ['Node'] }
11-
js-sys = { path = '../crates/js-sys' }
1212

1313
[lib]
1414
crate-type = ['cdylib']

crates/backend/Cargo.toml

+8-8
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
11
[package]
2-
name = "wasm-bindgen-backend"
3-
version = "0.2.92"
42
authors = ["The wasm-bindgen Developers"]
5-
license = "MIT OR Apache-2.0"
6-
repository = "https://github.com/rustwasm/wasm-bindgen/tree/master/crates/backend"
7-
homepage = "https://rustwasm.github.io/wasm-bindgen/"
8-
documentation = "https://docs.rs/wasm-bindgen-backend"
93
description = """
104
Backend code generation of the wasm-bindgen tool
115
"""
6+
documentation = "https://docs.rs/wasm-bindgen-backend"
127
edition = "2021"
13-
rust-version = "1.57"
8+
homepage = "https://rustwasm.github.io/wasm-bindgen/"
149
include = ["/LICENSE-*", "/src"]
10+
license = "MIT OR Apache-2.0"
11+
name = "wasm-bindgen-backend"
12+
repository = "https://github.com/rustwasm/wasm-bindgen/tree/master/crates/backend"
13+
rust-version = "1.57"
14+
version = "0.2.92"
1515

1616
[features]
17-
spans = []
1817
extra-traits = ["syn/extra-traits"]
18+
spans = []
1919

2020
[dependencies]
2121
bumpalo = "3.0.0"

crates/cli-support/Cargo.toml

+8-8
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
[package]
2-
name = "wasm-bindgen-cli-support"
3-
version = "0.2.92"
42
authors = ["The wasm-bindgen Developers"]
5-
license = "MIT OR Apache-2.0"
6-
repository = "https://github.com/rustwasm/wasm-bindgen/tree/master/crates/cli-support"
7-
homepage = "https://rustwasm.github.io/wasm-bindgen/"
8-
documentation = "https://docs.rs/wasm-bindgen-cli-support"
93
description = """
104
Shared support for the wasm-bindgen-cli package, an internal dependency
115
"""
6+
documentation = "https://docs.rs/wasm-bindgen-cli-support"
127
edition = "2021"
13-
rust-version = "1.76"
8+
homepage = "https://rustwasm.github.io/wasm-bindgen/"
149
include = ["/LICENSE-*", "/src"]
10+
license = "MIT OR Apache-2.0"
11+
name = "wasm-bindgen-cli-support"
12+
repository = "https://github.com/rustwasm/wasm-bindgen/tree/master/crates/cli-support"
13+
rust-version = "1.76"
14+
version = "0.2.92"
1515

1616
[dependencies]
1717
anyhow = "1.0"
@@ -20,11 +20,11 @@ log = "0.4"
2020
rustc-demangle = "0.1.13"
2121
serde_json = "1.0"
2222
tempfile = "3.0"
23+
unicode-ident = "1.0.5"
2324
walrus = "0.21"
2425
wasm-bindgen-externref-xform = { path = '../externref-xform', version = '=0.2.92' }
2526
wasm-bindgen-multi-value-xform = { path = '../multi-value-xform', version = '=0.2.92' }
2627
wasm-bindgen-shared = { path = "../shared", version = '=0.2.92' }
2728
wasm-bindgen-threads-xform = { path = '../threads-xform', version = '=0.2.92' }
2829
wasm-bindgen-wasm-conventions = { path = '../wasm-conventions', version = '=0.2.92' }
2930
wasm-bindgen-wasm-interpreter = { path = "../wasm-interpreter", version = '=0.2.92' }
30-
unicode-ident = "1.0.5"

crates/cli/Cargo.toml

+12-15
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,36 @@
11
[package]
2-
name = "wasm-bindgen-cli"
3-
version = "0.2.92"
42
authors = ["The wasm-bindgen Developers"]
5-
license = "MIT OR Apache-2.0"
6-
repository = "https://github.com/rustwasm/wasm-bindgen/tree/master/crates/cli"
7-
homepage = "https://rustwasm.github.io/wasm-bindgen/"
8-
documentation = "https://rustwasm.github.io/wasm-bindgen/"
93
categories = ["wasm"]
4+
default-run = 'wasm-bindgen'
105
description = """
116
Command line interface of the `#[wasm_bindgen]` attribute and project. For more
127
information see https://github.com/rustwasm/wasm-bindgen.
138
"""
9+
documentation = "https://rustwasm.github.io/wasm-bindgen/"
1410
edition = "2021"
15-
default-run = 'wasm-bindgen'
16-
rust-version = "1.76"
11+
homepage = "https://rustwasm.github.io/wasm-bindgen/"
1712
include = ["/LICENSE-*", "/src"]
13+
license = "MIT OR Apache-2.0"
14+
name = "wasm-bindgen-cli"
15+
repository = "https://github.com/rustwasm/wasm-bindgen/tree/master/crates/cli"
16+
rust-version = "1.76"
17+
version = "0.2.92"
1818

1919
[package.metadata.binstall]
20-
pkg-url = "https://github.com/rustwasm/wasm-bindgen/releases/download/{ version }/wasm-bindgen-{ version }-{ target }{ archive-suffix }"
2120
bin-dir = "wasm-bindgen-{ version }-{ target }/{ bin }{ binary-ext }"
21+
pkg-url = "https://github.com/rustwasm/wasm-bindgen/releases/download/{ version }/wasm-bindgen-{ version }-{ target }{ archive-suffix }"
2222

2323
[dependencies]
24+
anyhow = "1.0"
2425
docopt = "1.0"
2526
env_logger = "0.11.5"
26-
anyhow = "1.0"
2727
log = "0.4"
2828
native-tls = { version = "0.2", default-features = false, optional = true }
2929
rouille = { version = "3.0.0", default-features = false }
3030
serde = { version = "1.0", features = ['derive'] }
3131
serde_derive = "1.0"
3232
serde_json = "1.0"
33-
ureq = { version = "2.7", default-features = false, features = [
34-
"brotli",
35-
"gzip",
36-
] }
33+
ureq = { version = "2.7", default-features = false, features = ["brotli", "gzip"] }
3734
walrus = { version = "0.21", features = ['parallel'] }
3835
wasm-bindgen-cli-support = { path = "../cli-support", version = "=0.2.92" }
3936
wasm-bindgen-shared = { path = "../shared", version = "=0.2.92" }
@@ -48,8 +45,8 @@ wasmparser = "0.212"
4845
wasmprinter = "0.212"
4946

5047
[[test]]
51-
name = "reference"
5248
harness = false
49+
name = "reference"
5350

5451
[features]
5552
default = ["rustls-tls"]

crates/example-tests/Cargo.toml

+4-9
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,21 @@
11
[package]
2-
name = "example-tests"
3-
version = "0.0.0"
42
authors = ["The wasm-bindgen Developers"]
53
edition = "2021"
4+
name = "example-tests"
65
publish = false
6+
version = "0.0.0"
77

88
[features]
99
default = ["stable"]
10-
stable = []
1110
nightly = []
11+
stable = []
1212

1313
[dependencies]
1414
anyhow = "1.0.75"
1515
futures-util = { version = "0.3.28", features = ["sink"] }
1616
http = "1"
1717
hyper = "1"
18-
hyper-util = { version = "0.1.6", features = [
19-
"http1",
20-
"service",
21-
"server",
22-
"tokio",
23-
] }
18+
hyper-util = { version = "0.1.6", features = ["http1", "service", "server", "tokio"] }
2419
mozprofile = "0.9"
2520
mozrunner = "0.15"
2621
serde = { version = "1.0", features = ["derive"] }

crates/externref-xform/Cargo.toml

+8-8
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
[package]
2-
name = "wasm-bindgen-externref-xform"
3-
version = "0.2.92"
42
authors = ["The wasm-bindgen Developers"]
5-
license = "MIT OR Apache-2.0"
6-
repository = "https://github.com/rustwasm/wasm-bindgen/tree/master/crates/externref-xform"
7-
homepage = "https://rustwasm.github.io/wasm-bindgen/"
8-
documentation = "https://docs.rs/wasm-bindgen-externref-xform"
93
description = """
104
Internal externref transformations for wasm-bindgen
115
"""
6+
documentation = "https://docs.rs/wasm-bindgen-externref-xform"
127
edition = "2021"
13-
rust-version = "1.76"
8+
homepage = "https://rustwasm.github.io/wasm-bindgen/"
149
include = ["/LICENSE-*", "/src"]
10+
license = "MIT OR Apache-2.0"
11+
name = "wasm-bindgen-externref-xform"
12+
repository = "https://github.com/rustwasm/wasm-bindgen/tree/master/crates/externref-xform"
13+
rust-version = "1.76"
14+
version = "0.2.92"
1515

1616
[dependencies]
1717
anyhow = "1.0"
@@ -25,5 +25,5 @@ wast = "212"
2525
wat = "1.0"
2626

2727
[[test]]
28-
name = "all"
2928
harness = false
29+
name = "all"

crates/futures/Cargo.toml

+7-10
Original file line numberDiff line numberDiff line change
@@ -2,38 +2,35 @@
22
authors = ["The wasm-bindgen Developers"]
33
description = "Bridging the gap between Rust Futures and JavaScript Promises"
44
documentation = "https://docs.rs/wasm-bindgen-futures"
5+
edition = "2021"
56
homepage = "https://rustwasm.github.io/wasm-bindgen/"
7+
include = ["/LICENSE-*", "/src"]
68
license = "MIT OR Apache-2.0"
79
name = "wasm-bindgen-futures"
8-
repository = "https://github.com/rustwasm/wasm-bindgen/tree/master/crates/futures"
910
readme = "./README.md"
10-
version = "0.4.42"
11-
edition = "2021"
11+
repository = "https://github.com/rustwasm/wasm-bindgen/tree/master/crates/futures"
1212
rust-version = "1.57"
13-
include = ["/LICENSE-*", "/src"]
13+
version = "0.4.42"
1414

1515
[package.metadata.docs.rs]
1616
all-features = true
1717
rustdoc-args = ["--cfg", "docsrs"]
1818

1919
[dependencies]
2020
cfg-if = "1.0.0"
21+
futures-core = { version = '0.3.8', default-features = false, optional = true }
2122
js-sys = { path = "../js-sys", version = '0.3.69' }
2223
wasm-bindgen = { path = "../..", version = '0.2.92' }
23-
futures-core = { version = '0.3.8', default-features = false, optional = true }
2424

2525
[features]
2626
futures-core-03-stream = ['futures-core']
2727

2828
[target.'cfg(target_feature = "atomics")'.dependencies.web-sys]
29+
features = ["MessageEvent", "Worker"]
2930
path = "../web-sys"
3031
version = "0.3.24"
31-
features = [
32-
"MessageEvent",
33-
"Worker",
34-
]
3532

3633
[target.'cfg(target_arch = "wasm32")'.dev-dependencies]
37-
wasm-bindgen-test = { path = '../test' }
3834
futures-channel-preview = { version = "0.3.0-alpha.18" }
3935
futures-lite = { version = "1.11.3", default-features = false }
36+
wasm-bindgen-test = { path = '../test' }

0 commit comments

Comments
 (0)