cargo-wgsl 0.0.13

Validate wgsl in rust projects
1
2
3
4
5
6
7
8
9
10
from subprocess import Popen, PIPE, STDOUT

process = Popen(["./target/debug/cargo-wgsl", "--server"],
                stdout=PIPE, stdin=PIPE, stderr=STDOUT)

event = """{"event":{"ValidatePath": "./tests/test.wgsl"}}"""

p_stdout = process.communicate(input=str.encode(event))[0]

print(p_stdout.decode())