Hello everyone! It took me about a month of vibe coding in my spare time to create the Draco library entirely in Rust. It wasn't easy and required a lot of patience, but I'm finally happy to share the code with everyone:
https://github.com/Filyus/draco
First, I split the C++ code into two projects and moved all the .cc files to root folders:
Then I created the code in Rust:
https://github.com/Filyus/draco/tree/main/crates
I also split it into draco-core and draco-io, which supports converting geometry (and, if possible, normals) to and from GLTF/GLB, FBX, OBJ, and PLY.
I also wrote WASM modules and a sample web application for conversion:
https://github.com/Filyus/draco/tree/main/web
As a result, gltf_reader.wasm is 203 KB (~245 KB now). For context, Google's draco_decoder.wasm is ~286 KB, and the glTF-oriented draco_decoder_gltf.wasm is ~193 KB. Unlike those standalone Draco decoders, this module also parses GLTF/GLB files.
The code now passes the Rust workspace tests and web workspace tests, and the branch has been rebased onto the current google/main. I'm continuing with final cleanup and hardening before preparing it as a PR.
Hello everyone! It took me about a month of vibe coding in my spare time to create the Draco library entirely in Rust. It wasn't easy and required a lot of patience, but I'm finally happy to share the code with everyone:
https://github.com/Filyus/draco
First, I split the C++ code into two projects and moved all the .cc files to root folders:
Then I created the code in Rust:
https://github.com/Filyus/draco/tree/main/crates
I also split it into draco-core and draco-io, which supports converting geometry (and, if possible, normals) to and from GLTF/GLB, FBX, OBJ, and PLY.
I also wrote WASM modules and a sample web application for conversion:
https://github.com/Filyus/draco/tree/main/web
As a result,
gltf_reader.wasmis203 KB(~245 KB now). For context, Google'sdraco_decoder.wasmis ~286 KB, and the glTF-orienteddraco_decoder_gltf.wasmis ~193 KB. Unlike those standalone Draco decoders, this module also parses GLTF/GLB files.The code now passes the Rust workspace tests and web workspace tests, and the branch has been rebased onto the current
google/main. I'm continuing with final cleanup and hardening before preparing it as a PR.