jshrake / jshrake/glsl-include

Make Context::expand return Cow 🐄

Open
#38 3 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
5
Forks
3
PR merge metrics
No merged PRs in 30d

Description

I think it would make sense for Context::expand to take in a slice &'a str and return a Cow<'a, str> to remove extra allocations when the glsl input has no includes.

Would you accept a PR?

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Locate Context::expand and its callers, then inspect how expansion handles GLSL input with and without includes. Done means the method accepts a string slice and returns the proposed Cow type while preserving expansion behavior and avoiding an allocation when no includes are present.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
performance
Issue type
Refactor
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.