Skip to content

repo structure options for multi-language publishing and testing.. #266

@mighdoll

Description

@mighdoll

I guess there are many options to support multiple shader languages and tests in Lygia. Here's a few:

  • single-repo - all shaders and all tests in one repo.
  • multi-repo - each language w/tests in its own repo.
  • monorepo - all shaders and all tests in one repo, with subdirectories containing their own package.json.
  • submodules - all shaders in one repo, per language tests in separate repos with submodules including their main repo.

single-repo:

lygia:
  wesl-test/
  glsl-test/
  package.json
  color/
  ...

multi-repo:

lygia_wgsl:
  package.json
  test/
  color/  #only .wgsl files
  ...

monorepo:

lygia:
  packages/
    lygia_wgsl/
      package.json
      test/
    lygia_glsl/
      package.json
      test/
  package.json  # lygia npm pkg has multiple exports, users import as `lygia/glsl`, or `lygia/wgsl`, etc.
  color/
  ...

submodule:

lygia:
  color/
  ...
lygia_wgsl:   
  lygia -- submodule -- 
  tests/
  package.json. # lygia_wgsl npm package has a single export, users import as 'lygia_wgsl'

We've some experience with these in the wgsl-tooling-wg repos. Happy to help you with any of them. I'd recommend single-repo if you can, it's by far the easiest. monorepo is the next simplest if you want to keep the shader language implementations together in the same directory as now.

Any solution with multiple repos raises hassles of keeping the repos in sync. And PRs don't work across multiple repos. We use submodules too, but I'd avoid that if you can. Submodules add complexity and hassles for educating/configuring every new contributor, plus all the problems with multiple repos.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions