schell / schell/wgsl-rs

feature-gated serde for `wgsl-rs::std` types

Open
#147 1 comment 0 reactions 0 assignees View on GitHub
enhancement P1 wgsl-std
Dominant language
Rust
Stars
61
Forks
4
Avg merge
1d 21h
Merged PRs (30d)
9

Description

`wgsl-rs::std` defines it's own Vec/Matrix types, but also has conversion functions from `glam` types.

It's a bit annoying to having lots of `.into()`s everywhere and different "api"s for in and outside of `#[wgsl]` modules (e.g. `round(v)` vs `v.round()` ), so I thought I'd just use `wgsl-rs::std` types everywhere instead of `glam` types.

However, I need to be able to serialize my types and so I'd need `serde` impls for my math types (and the orphan rule means it can't be done in a downstream crate).

p.s. thanks for adding the texture_storage support ❤️

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by locating the `wgsl-rs::std` Vec and Matrix definitions and their existing `glam` conversion functions. Check how optional features are declared, then verify that enabling `serde` provides serialization implementations for the math types without requiring it by default.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
computer-graphics
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
66/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.