Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
28 changes: 12 additions & 16 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,8 @@ jobs:
- uses: actions/checkout@v4
- uses: DavidAnson/markdownlint-cli2-action@v20
with:
config: '.markdownlint.jsonc'
globs: '**/*.md'
config: ".markdownlint.jsonc"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just FYI, double quotes in YAML have different semantics than single quotes. It's like writing format!("X") instead of just "X".

globs: "**/*.md"

toml:
runs-on: ubuntu-latest
Expand All @@ -131,22 +131,18 @@ jobs:
- uses: actions/checkout@v4
with:
submodules: "true"
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{ env.STABLE_TOOLCHAIN }}
- name: Install taplo
run: cargo install taplo-cli --locked
- name: Run Taplo
id: taplo
run: taplo fmt --check --diff
- name: Taplo info
- uses: tombi-toml/setup-tombi@v1
- name: Lint TOML files
run: tombi lint
- name: Check formatting of TOML files
run: tombi format --check
- name: Tombi info
if: failure()
run: |
echo 'To fix toml fmt, please run `taplo fmt`.'
echo 'To check for a diff, run `taplo fmt --check --diff`.'
echo 'You can find taplo here: https://taplo.tamasfe.dev/.'
echo 'Also use the `Even Better Toml` extension.'
echo 'You can find the extension here: https://marketplace.visualstudio.com/items?itemName=tamasfe.even-better-toml'
echo 'To fix toml fmt, please run `tombi fmt`.'
echo 'You can find tombi here: http://tombi-toml.github.io/tombi/.'
echo 'Also use the `Tombi` extension.'
echo 'You can find the extension here: https://marketplace.visualstudio.com/items?itemName=tombi-toml.tombi'
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I should open an upstream issue about the Tombi VSCode extension not always inserting a newline at the end of the file when formatting it.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It should be respecting .editorconfig

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tombi-toml/tombi#934

Okay, there's now an upstream issue about this. Turns out I didn't have to open one, I just had to wait


typos:
runs-on: ubuntu-latest
Expand Down
46 changes: 22 additions & 24 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,43 +1,41 @@
[workspace]
resolver = "3"
members = [
"crates/wgsl-parse",
"crates/wgsl-types",
"crates/wesl-macros",
"crates/wesl",
"crates/wesl-test",
"crates/wesl-cli",
"crates/wesl-web",
"crates/wesl-c",
"crates/tokrepr",
"crates/tokrepr-derive",
"examples/random_wgsl",
"examples/wesl-consumer",
"crates/tokrepr",
"crates/tokrepr-derive",
"crates/wesl",
"crates/wesl-c",
"crates/wesl-cli",
"crates/wesl-macros",
"crates/wesl-test",
"crates/wesl-web",
"crates/wgsl-parse",
"crates/wgsl-types",
"examples/random_wgsl",
"examples/wesl-consumer",
]

resolver = "3"

[workspace.package]
authors = ["WESL Contributors", "Mathis Brossier <[email protected]>"]
edition = "2024"
license = "MIT OR Apache-2.0"
repository = "https://github.com/wgsl-tooling-wg/wesl-rs"
version = "0.2.0"
edition = "2024"
rust-version = "1.87.0"
repository = "https://github.com/wgsl-tooling-wg/wesl-rs"
license = "MIT OR Apache-2.0"

[workspace.dependencies]
wgsl-parse = { path = "crates/wgsl-parse", version = "0.2.0" }
wgsl-types = { path = "crates/wgsl-types", version = "0.2.0" }
wesl = { path = "crates/wesl", version = "0.2.0" }
wesl-macros = { path = "crates/wesl-macros", version = "0.2.0" }
tokrepr = { path = "crates/tokrepr", version = "0.1.0" }
tokrepr-derive = { path = "crates/tokrepr-derive", version = "0.1.0" }

[workspace.lints.rust]
wesl = { path = "crates/wesl", version = "0.2.0" }
wesl-macros = { path = "crates/wesl-macros", version = "0.2.0" }
wgsl-parse = { path = "crates/wgsl-parse", version = "0.2.0" }
wgsl-types = { path = "crates/wgsl-types", version = "0.2.0" }

[workspace.lints.clippy]
# TODO: change eventually
mutable_key_type = "allow"

[workspace.lints.rust]

[patch.crates-io]
wesl = { path = "crates/wesl" }

Expand Down
15 changes: 7 additions & 8 deletions crates/tokrepr-derive/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,21 +1,20 @@
[package]
name = "tokrepr-derive"
description = "Derive macro for tokrepr"
authors.workspace = true
edition.workspace = true
license.workspace = true
repository.workspace = true
version = "0.1.0"
edition.workspace = true
rust-version.workspace = true
description = "Derive macro for tokrepr"
repository.workspace = true
license.workspace = true

[lib]
proc-macro = true

[dependencies]
itertools = "0.14.0"
proc-macro2 = "1.0.86"
quote = "1.0.37"
syn = "2.0.77"

[lib]
proc-macro = true

[lints]
workspace = true
9 changes: 4 additions & 5 deletions crates/tokrepr/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
[package]
name = "tokrepr"
description = "Turn Rust instances into token representations"
authors.workspace = true
edition.workspace = true
license.workspace = true
repository.workspace = true
version = "0.1.1"
edition.workspace = true
rust-version.workspace = true
description = "Turn Rust instances into token representations"
repository.workspace = true
license.workspace = true

[dependencies]
proc-macro2 = "1.0.86"
Expand Down
13 changes: 6 additions & 7 deletions crates/wesl-c/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,21 +1,20 @@
[package]
name = "wesl-c"
authors.workspace = true
edition.workspace = true
license.workspace = true
repository.workspace = true
version.workspace = true
edition.workspace = true
rust-version.workspace = true
repository.workspace = true
license.workspace = true

[lib]
crate-type = ["cdylib", "staticlib"]

[dependencies]
wesl = { workspace = true }

[lints]
workspace = true

[features]
eval = ["wesl/eval"]
generics = ["wesl/generics"]

[lints]
workspace = true
23 changes: 11 additions & 12 deletions crates/wesl-cli/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,26 +1,25 @@
[package]
authors.workspace = true
default-run = "wesl"
description = "Various tools to parse, verify, evaluate and modify wgsl shader source."
documentation = "https://docs.rs/wesl-cli"
edition.workspace = true
license.workspace = true
name = "wesl-cli"
repository.workspace = true
version.workspace = true
edition.workspace = true
rust-version.workspace = true
description = "Various tools to parse, verify, evaluate and modify wgsl shader source."
documentation = "https://docs.rs/wesl-cli"
repository.workspace = true
license.workspace = true
default-run = "wesl"

[[bin]]
name = "wesl"
path = "src/main.rs"

[dependencies]
clap = { version = "4.5.11", features = ["derive"] }
naga = { version = "25.0.1", optional = true, features = ["wgsl-in"] }
naga = { version = "25.0.1", features = ["wgsl-in"], optional = true }
thiserror = "2.0.11"
wesl = { workspace = true, features = ["eval", "generics", "package"] }
wgsl-parse = { workspace = true }

[[bin]]
name = "wesl"
path = "src/main.rs"

[features]
default = ["naga"]

Expand Down
17 changes: 8 additions & 9 deletions crates/wesl-macros/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,29 +1,28 @@
[package]
name = "wesl-macros"
description = "Macros for the WESL rust compiler"
documentation = "https://docs.rs/wesl-macros"
version.workspace = true
edition.workspace = true
authors.workspace = true
rust-version.workspace = true
description = "Macros for the WESL rust compiler"
documentation = "https://docs.rs/wesl-macros"
repository.workspace = true
license.workspace = true
rust-version.workspace = true

[lib]
proc-macro = true

[dependencies]
wgsl-parse = { workspace = true, features = ["wesl", "tokrepr"] }
itertools = "0.14.0"
proc-macro2 = "1.0.86"
proc-macro-error2 = { version = "2.0.1", optional = true }
quote = "1.0.37"
syn = "2.0.77"
proc-macro-error2 = { version = "2.0.1", optional = true }
token_stream_flatten = { version = "0.1.0", optional = true }
wgsl-parse = { workspace = true, features = ["tokrepr", "wesl"] }

[features]
query = []
quote = ["dep:proc-macro-error2", "dep:token_stream_flatten"]

[lib]
proc-macro = true

[lints]
workspace = true
17 changes: 8 additions & 9 deletions crates/wesl-test/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,24 @@
name = "wesl-test"
version.workspace = true
edition.workspace = true
authors.workspace = true
rust-version.workspace = true
repository.workspace = true
license.workspace = true
rust-version.workspace = true

[[test]]
harness = false
name = "testsuite"

[dependencies]
serde = { version = "1.0.210", features = ["derive"] }
regex = "1.11.1"
serde = { version = "1.0.210", features = ["derive"] }

[dev-dependencies]
bevy-wgsl = { git = "https://github.com/wgsl-tooling-wg/bevy-wgsl", rev = "575208586e6fcbd9df21c3b8d90669e67045b3e0" }
libtest-mimic = "0.8.1"
serde_json = "1.0.140"
wgsl-parse = { workspace = true }
wesl = { workspace = true, features = ["eval", "naga_ext"] }
bevy-wgsl = { git = "https://github.com/wgsl-tooling-wg/bevy-wgsl", rev = "575208586e6fcbd9df21c3b8d90669e67045b3e0" }
wgsl-parse = { workspace = true }

[lints]
workspace = true

[[test]]
name = "testsuite"
harness = false
39 changes: 18 additions & 21 deletions crates/wesl-web/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,42 +1,39 @@
[package]
name = "wesl-web"
description = "WESL compiler in WebAssembly"
version.workspace = true
edition.workspace = true
authors.workspace = true
rust-version.workspace = true
description = "WESL compiler in WebAssembly"
repository.workspace = true
license.workspace = true
rust-version.workspace = true

[lib]
crate-type = ["cdylib", "rlib"]

[features]
default = ["ansi-to-html", "naga"]
debug = ["console_log", "console_error_panic_hook"]

[dependencies]
log = "0.4.22"
serde = { version = "1.0.215", features = ["derive"] }
serde-wasm-bindgen = "0.6.5"
serde_bytes = "0.11.15"
tsify = { version = "0.5.5", features = ["js"], default-features = false }
ansi-to-html = { version = "0.2.2", optional = true }
naga = { version = "25.0.1", features = [
"wgsl-in",
"wgsl-out",
], optional = true }
thiserror = "2.0.11"
wasm-bindgen = "0.2.95"

wesl = { workspace = true, features = ["eval", "serde"] }

# The `console_error_panic_hook` crate provides better debugging of panics by
# logging them with `console.error`. This is great for development, but requires
# all the `std::fmt` and `std::panicking` infrastructure, so isn't great for
# code size when deploying.
console_error_panic_hook = { version = "0.1.7", optional = true }
console_log = { version = "1.0.0", features = ["color"], optional = true }
log = "0.4.22"
naga = { version = "25.0.1", features = [
"wgsl-in",
"wgsl-out",
], optional = true }
serde = { version = "1.0.215", features = ["derive"] }
serde_bytes = "0.11.15"
serde-wasm-bindgen = "0.6.5"
thiserror = "2.0.11"
tsify = { version = "0.5.5", default-features = false, features = ["js"] }
wasm-bindgen = "0.2.95"
wesl = { workspace = true, features = ["eval", "serde"] }

[features]
default = ["ansi-to-html", "naga"]
debug = ["console_error_panic_hook", "console_log"]

[lints]
workspace = true
Loading
Loading