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

Can trunk serve examples? #423

Closed
gilescope opened this issue Sep 3, 2022 · 7 comments · May be fixed by #457 or #915
Closed

Can trunk serve examples? #423

gilescope opened this issue Sep 3, 2022 · 7 comments · May be fixed by #457 or #915
Labels
enhancement New feature or request help wanted Extra attention is needed Stale

Comments

@gilescope
Copy link
Contributor

I've hit this a few times now. I would like to trunk serve some bevy examples that ought to work using the web. I guess https://github.com/eliotbo/bevy_shadertoy_wgsl/tree/main/examples is a canonical example. Is there a nice way of pointing trunk at an example? While I can see there's a bin I can point to using an index.html, there's no specific Cargo.toml to point to with examples...

So I thought I'd ask here to see if anyone has a good solution / workaround other than moving the example and giving it its own Cargo.toml...

@simbleau
Copy link
Member

simbleau commented Sep 3, 2022

I built https://github.com/kurbos/bevy-shell-template, which uses a Trunk.toml to point to a WASM launcher for Bevy. Use this as a gold standard. But Trunk (afaik) does not support --example currently.

@gilescope
Copy link
Contributor Author

gilescope commented Sep 3, 2022 via email

@simbleau
Copy link
Member

simbleau commented Sep 3, 2022

I totally agree. It should be a feature, but I don't have the bandwidth. If you want to add the --example (which would default check for an index.html in the example's folder) CLI syntax with a PR, I'd be happy to review it.

@simbleau simbleau added enhancement New feature or request help wanted Extra attention is needed labels Sep 7, 2022
@ActuallyHappening
Copy link

ActuallyHappening commented May 13, 2023

Can we please get an --example flag?
It would greatly simplify using inbuilt rust examples for WASM targets, rather than extracting the tests into there own seperate Cargo.toml project

@gilescope
Copy link
Contributor Author

gilescope commented May 13, 2023 via email

@github-actions
Copy link

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

@github-actions github-actions bot added the Stale label Sep 22, 2023
@github-actions
Copy link

This issue was closed because it has been stalled for 5 days with no activity.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Sep 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed Stale
Projects
None yet
3 participants