-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathCargo.toml
102 lines (94 loc) · 3 KB
/
Cargo.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
[package]
name = "wasm2spirv"
description = "Compile your WebAssembly programs into SPIR-V shaders"
version = "0.1.1"
edition = "2021"
keywords = ["wasm", "spirv", "vulkan", "webassembly", "compiler"]
categories = [
"compilers",
"development-tools",
"game-development",
"graphics",
"wasm",
]
repository = "https://github.com/Aandreba/wasm2spirv"
license = "MIT"
exclude = [
"playground",
"examples",
".vscode",
".github",
"TODO.md",
"justfile",
]
[package.metadata.docs.rs]
all-features = true
targets = [
"x86_64-pc-windows-msvc",
"x86_64-unknown-linux-gnu",
"aarch64-apple-darwin",
"x86_64-apple-darwin",
]
rustdoc-args = ["--cfg", "docsrs"]
[features]
# Macro features
cli = ["clap", "color-eyre", "serde_json"]
khronos-all = ["spvt-validate", "spvc-glsl", "spvc-hlsl", "spvc-msl"]
naga-all = ["naga-validate", "naga-glsl", "naga-hlsl", "naga-msl", "naga-wgsl"]
tree-sitter = [
"dep:tree-sitter",
"tree-sitter-highlight",
"tree-sitter-asm",
"colored",
]
# SPIR-V Cross compilers
spvc-glsl = ["spirvcross", "spirvcross/glsl", "tree-sitter-glsl"]
spvc-hlsl = ["spirvcross", "spirvcross/hlsl", "tree-sitter-hlsl"]
spvc-msl = ["spirvcross", "spirvcross/msl", "tree-sitter-c"]
spvt-validate = ["spirv-tools"]
# Naga compilers
naga-glsl = ["naga", "naga/glsl-out", "tree-sitter-glsl"]
naga-hlsl = ["naga", "naga/hlsl-out", "tree-sitter-hlsl"]
naga-msl = ["naga", "naga/msl-out", "tree-sitter-c"]
naga-wgsl = ["naga", "naga/wgsl-out", "tree-sitter-wgsl"]
naga-validate = ["naga", "naga/validate"]
[lib]
path = "src/lib.rs"
[[bin]]
name = "wasm2spirv"
path = "src/cli.rs"
required-features = ["clap", "color-eyre", "serde_json"]
[dependencies]
cfg-if = "1.0.0"
clap = { version = "4.3.19", optional = true, features = ["derive", "env"] }
color-eyre = { version = "0.6.2", optional = true }
colored = { version = "2.0.4", optional = true }
docfg = "0.1.0"
naga = { version = "0.13.0", features = ["spv-in"], optional = true }
num_enum = "0.6.1"
once_cell = "1.18.0"
rspirv = "0.11.0"
serde = { version = "1.0.180", features = ["derive"] }
serde_json = { version = "1.0.104", optional = true }
spirv = { version = "0.2.0", features = ["serde", "serialize", "deserialize"] }
spirv-tools = { version = "0.9.0", optional = true }
spirvcross = { version = "0.1.0", optional = true }
thiserror = "1.0.43"
tracing = "0.1.37"
tracing-subscriber = "0.3.17"
vector_mapp = { version = "0.3.2", features = ["serde"] }
wasmparser = "0.110.0"
wat = "1.0.69"
[target.'cfg(any(unix, windows))'.dependencies]
tree-sitter = { version = "0.20.10", optional = true }
tree-sitter-asm = { version = "0.1.0", optional = true }
tree-sitter-c = { version = "0.20.4", optional = true }
tree-sitter-glsl = { version = "0.1.4", optional = true }
tree-sitter-highlight = { version = "0.20.1", optional = true }
tree-sitter-hlsl = { version = "0.1.2", optional = true }
tree-sitter-wgsl = { version = "0.0.6", optional = true }
[dev-dependencies]
color-eyre = "0.6.2"
serde_json = "1.0.104"
[workspace]
members = ["playground"]