Skip to content

Revise Packaging.md - #173

Merged
k2d222 merged 10 commits into
mainfrom
k2d222-patch-5
Jul 22, 2026
Merged

Revise Packaging.md#173
k2d222 merged 10 commits into
mainfrom
k2d222-patch-5

Conversation

@k2d222

@k2d222 k2d222 commented Dec 19, 2025

Copy link
Copy Markdown
Contributor

It's time to un-draft Packaging.md

@k2d222
k2d222 marked this pull request as ready for review February 28, 2026 13:26
@k2d222

k2d222 commented Feb 28, 2026

Copy link
Copy Markdown
Contributor Author

no time or interest to finish this, but it's already an improvement to the exitsing file. OK to merge?

Comment thread Packaging.md Outdated
Comment thread Packaging.md Outdated
Comment thread Packaging.md

@mighdoll mighdoll left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It'll be good to get this in! sorry for forgetting about it and glad you're pushing it forward. lmk if you want help on any of the minor edits, I can make more specific text proposals if needed.

Comment thread Packaging.md Outdated
Comment thread Packaging.md Outdated
Comment thread Packaging.md Outdated

(TODO: unification with param const?)

If two packages in the dependency tree are [semver-compatible](https://semver.org/), npm or Cargo will likely unify them, meaning it will include only one version of the package in its output (often the highest semver-compatible version available).

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we might say that users are doing this unification. i.e. users of npm and cargo may unify them.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, I see, the point is that package managers will sometimes unify by default. I think that's the default for npm, though the rules are overridable and expectations vary on whether indirect dependencies are unified. (AFAIR by default pnpm doesn't unify indirect dependencies, but npm might still do that)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lemme know if the current revision clarifies.

Comment thread Packaging.md Outdated
Comment thread Packaging.md Outdated
Comment thread Packaging.md Outdated
Comment thread Packaging.md Outdated
apply revisions
@k2d222
k2d222 requested review from mighdoll and stefnotch July 7, 2026 15:03

@mighdoll mighdoll left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, nice work moving this forward! Suggestions below are mostly editorial.

Comment thread Packaging.md Outdated
Comment thread Packaging.md Outdated
Comment thread Packaging.md Outdated
Comment thread Packaging.md Outdated
Comment thread Packaging.md

## Creating and publishing shader packages

Any [`wesl.toml`] file declares a new shader package, which can be published using the linker's CLI.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in js, wesl-packager is currently a separate cli (from the wesl-link cli).

Comment thread Packaging.md Outdated
Comment thread Packaging.md Outdated
Comment thread Packaging.md Outdated
Comment thread Packaging.md Outdated
Comment thread Packaging.md Outdated
Comment thread Packaging.md Outdated
@mighdoll  comment revisions

@experimentslee experimentslee left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looking good. best not promise to wesl.toml deps for wesl-js.
resolve/review the 4 comments and then LGTM w/o further review

Comment thread Packaging.md Outdated
Comment thread Packaging.md Outdated
Comment thread Packaging.md Outdated
Comment thread Packaging.md Outdated
Comment thread Packaging.md
1. The name is sanitized to remove certain common symbols that are invalid in WGSL identifiers (see following section).
2. The name can be overriden in the dependencies list in [`wesl.toml`], e.g. `wgsl_name = { package = "@published/name" }`.

If after these operations, the shader name is still not a valid WGSL identifier, the package will not be reachable from user code.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if it should be an error instead. i.e. the linker must check that the package name is a valid WGSL ident. Does -js do that? @mighdoll

@mighdoll mighdoll Jul 22, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The packager tool should error and it doesn't. Good one. (the -js library consumer would fail because it's unreachable. The consumer could workaround with a package.json rename, but that's a bit late)

@k2d222
k2d222 merged commit fffc016 into main Jul 22, 2026
1 check passed
@github-project-automation github-project-automation Bot moved this from Todo to Done in specs and docs Jul 22, 2026
@k2d222
k2d222 deleted the k2d222-patch-5 branch July 22, 2026 13:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants