Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adding custom chugins #37

Open
cchafe opened this issue Sep 1, 2024 · 3 comments
Open

adding custom chugins #37

cchafe opened this issue Sep 1, 2024 · 3 comments
Labels
question Further information is requested

Comments

@cchafe
Copy link

cchafe commented Sep 1, 2024

I drag a .chug.wasm into the file list and it sets the correct serverFilename and an
identical virtualFilename. Is it the case that it actually needs different entries in order to
function as a chugin? My working examples (edited by hand) of exported pages had to have the virtualFilename pre-pended with '/chugins/'

@terryzfeng
Copy link
Member

Yes you can manually load them into the /chugins folder or use the call loadChugin function before init for that to be handled automatically.

@cchafe
Copy link
Author

cchafe commented Sep 1, 2024

Any way to do this in the IDE? Dragging in a file wouldn't be enough.

@terryzfeng
Copy link
Member

terryzfeng commented Sep 10, 2024

There's no way to load chugins into the IDE because chugins cannot be loaded after the VM starts (which is immediate on page load). @gewang might still be working on runtime chugin loading with some @import type syntax...

The preloaded list of chugins at VM start could be hackily modified if you want other chugins to be loaded:
https://github.com/ccrma/webchuck-ide/blob/main/src/utils/webChugins.ts
https://github.com/ccrma/webchuck-ide/blob/6c9a9656e600e7827f923378f2136f03d779dba1/src/host.ts#L66C1-L68C67

@terryzfeng terryzfeng added the question Further information is requested label Sep 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants