Adds the ability to attach ad-hoc processors to optimize#71
Open
mikesol wants to merge 35 commits into
Open
Conversation
added 22 commits
July 20, 2023 21:04
Author
|
Hm... it looks like bundling on windows isn't working but otherwise the PR/approach is ready for discussion. |
Author
|
@natefaubion I revamped the PR to use the current spago. |
Author
|
I also got rid of |
Author
|
I just hit a situation in my work on WebGPU where I needed to trigger a rewrite from a processor. I tweaked the processors to be |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR is the start of an exploration into the idea of fusing together deku nodes during a processing step.
To do this, I've reorganized the repo using the new spago, which lends itself well to a setup where there's both a lib and an executable.
The idea is that everything in
libwould be published to the registry as a library. Then, everything inpostinstallwould run as the npm postinstall step in order to build the optimizer with any processors that are present.It's a bit of a chicken-egg, because the package needs to exist as a lib before external processors can depend on it. But once that's overcome, people can build their processors against the lib and then
backend-escan be built against those custom processors.Unfortunately the PR looks much bigger than it is because so much stuff is moved around. All it's really doing is swapping in the new spago, adding a step to use the processors, and adding a stub for the postinstall. Once the lib is published, the postinstall stub can be unstubbed.
This PR is just to get the conversation going - while it works, I'm not particularly attached to the approach. So we can either validate the approach, suggest alternative ones, or rule out processors altogether if they seem too onerous. I borrowed the design from Unreal, which makes the engine open source so that folks can pull in libs that mod it.