@@ -23,26 +23,26 @@ default = []
23
23
# Make Vulkan backend available on platforms where it is by default not, e.g. macOS
24
24
vulkan = [" wgn/vulkan-portability" ]
25
25
26
- [dependencies .wgn ]
26
+ [target . 'cfg(not(target_arch = "wasm32"))' . dependencies .wgn ]
27
27
package = " wgpu-native"
28
28
version = " 0.4"
29
- git = " https://github.com/gfx-rs/wgpu"
30
- rev = " 39f17e50754aba6beeeabdd868ddfd700f9710c5"
31
- # path = "../wgpu/wgpu-native"
29
+ # git = "https://github.com/gfx-rs/wgpu"
30
+ # rev = "39f17e50754aba6beeeabdd868ddfd700f9710c5"
31
+ path = " ../wgpu/wgpu-native"
32
32
33
- [dependencies .wgc ]
33
+ [target . 'cfg(not(target_arch = "wasm32"))' . dependencies .wgc ]
34
34
package = " wgpu-core"
35
35
version = " 0.1"
36
- git = " https://github.com/gfx-rs/wgpu"
37
- rev = " 39f17e50754aba6beeeabdd868ddfd700f9710c5"
38
- # path = "../wgpu/wgpu-core"
36
+ # git = "https://github.com/gfx-rs/wgpu"
37
+ # rev = "39f17e50754aba6beeeabdd868ddfd700f9710c5"
38
+ path = " ../wgpu/wgpu-core"
39
39
40
40
[dependencies .wgt ]
41
41
package = " wgpu-types"
42
42
version = " 0.1"
43
- git = " https://github.com/gfx-rs/wgpu"
44
- rev = " 39f17e50754aba6beeeabdd868ddfd700f9710c5"
45
- # path = "../wgpu/wgpu-types"
43
+ # git = "https://github.com/gfx-rs/wgpu"
44
+ # rev = "39f17e50754aba6beeeabdd868ddfd700f9710c5"
45
+ path = " ../wgpu/wgpu-types"
46
46
47
47
[dependencies ]
48
48
arrayvec = " 0.5"
@@ -51,11 +51,97 @@ raw-window-handle = "0.3"
51
51
52
52
[dev-dependencies ]
53
53
cgmath = " 0.17"
54
- env_logger = " 0.7"
55
- glsl-to-spirv = " 0.1"
54
+ # glsl-to-spirv = "0.1"
56
55
log = " 0.4"
57
56
png = " 0.15"
58
- winit = " 0.20 "
57
+ winit = { version = " 0.22 " , features = [ " web-sys " ] }
59
58
rand = " 0.7.2"
60
59
zerocopy = " 0.2"
61
60
futures = " 0.3"
61
+
62
+ [target .'cfg(not(target_arch = "wasm32"))' .dependencies ]
63
+ env_logger = " 0.7"
64
+
65
+ [target .'cfg(target_arch = "wasm32")' .dependencies ]
66
+ wasm-bindgen = " 0.2.59"
67
+ web-sys = { version = " 0.3.36" , features = [
68
+ " Document" ,
69
+ " Navigator" ,
70
+ " Node" ,
71
+ " NodeList" ,
72
+ " Gpu" ,
73
+ " GpuAdapter" ,
74
+ " GpuBindGroup" ,
75
+ " GpuBindGroupBinding" ,
76
+ " GpuBindGroupDescriptor" ,
77
+ " GpuBindGroupLayout" ,
78
+ " GpuBindGroupLayoutBinding" ,
79
+ " GpuBindGroupLayoutDescriptor" ,
80
+ " GpuBlendDescriptor" ,
81
+ " GpuBlendFactor" ,
82
+ " GpuBlendOperation" ,
83
+ " GpuBindingType" ,
84
+ " GpuBuffer" ,
85
+ " GpuBufferBinding" ,
86
+ " GpuBufferDescriptor" ,
87
+ " GpuCanvasContext" ,
88
+ " GpuColorDict" ,
89
+ " GpuColorStateDescriptor" ,
90
+ " GpuCommandBuffer" ,
91
+ " GpuCommandBufferDescriptor" ,
92
+ " GpuCommandEncoder" ,
93
+ " GpuCommandEncoderDescriptor" ,
94
+ " GpuCompareFunction" ,
95
+ " GpuComputePassDescriptor" ,
96
+ " GpuComputePassEncoder" ,
97
+ " GpuComputePipeline" ,
98
+ " GpuComputePipelineDescriptor" ,
99
+ " GpuCullMode" ,
100
+ " GpuDepthStencilStateDescriptor" ,
101
+ " GpuDevice" ,
102
+ " GpuDeviceDescriptor" ,
103
+ " GpuFrontFace" ,
104
+ " GpuIndexFormat" ,
105
+ " GpuInputStepMode" ,
106
+ " GpuLimits" ,
107
+ " GpuLoadOp" ,
108
+ " GpuPipelineLayout" ,
109
+ " GpuPipelineLayoutDescriptor" ,
110
+ " GpuPowerPreference" ,
111
+ " GpuPrimitiveTopology" ,
112
+ " GpuProgrammableStageDescriptor" ,
113
+ " GpuQueue" ,
114
+ " GpuRasterizationStateDescriptor" ,
115
+ " GpuRenderPassColorAttachmentDescriptor" ,
116
+ " GpuRenderPassDepthStencilAttachmentDescriptor" ,
117
+ " GpuRenderPassDescriptor" ,
118
+ " GpuRenderPassEncoder" ,
119
+ " GpuRenderPipeline" ,
120
+ " GpuRenderPipelineDescriptor" ,
121
+ " GpuRequestAdapterOptions" ,
122
+ " GpuSampler" ,
123
+ " GpuShaderModule" ,
124
+ " GpuShaderModuleDescriptor" ,
125
+ " GpuStencilOperation" ,
126
+ " GpuStencilStateFaceDescriptor" ,
127
+ " GpuStoreOp" ,
128
+ " GpuSwapChain" ,
129
+ " GpuSwapChainDescriptor" ,
130
+ " GpuTexture" ,
131
+ " GpuTextureFormat" ,
132
+ " GpuTextureViewDimension" ,
133
+ " GpuTextureView" ,
134
+ " GpuVertexAttributeDescriptor" ,
135
+ " GpuVertexBufferLayoutDescriptor" ,
136
+ " GpuVertexFormat" ,
137
+ " GpuVertexStateDescriptor" ,
138
+ " GpuVertexAttributeDescriptor" ,
139
+ " HtmlCanvasElement" ,
140
+ " Window" ,
141
+ ]}
142
+ js-sys = " 0.3.36"
143
+ wasm-bindgen-futures = " 0.4.9"
144
+
145
+ [target .'cfg(target_arch = "wasm32")' .dev-dependencies ]
146
+ console_error_panic_hook = " 0.1.6"
147
+ console_log = " 0.1.2"
0 commit comments