Skip to content

Can trunk serve examples? #423

@gilescope

Description

@gilescope
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...

Activity

simbleau

simbleau commented on Sep 3, 2022

@simbleau
Member

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

gilescope commented on Sep 3, 2022

@gilescope
ContributorAuthor
simbleau

simbleau commented on Sep 3, 2022

@simbleau
Member

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.

ActuallyHappening

ActuallyHappening commented on May 13, 2023

@ActuallyHappening

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

gilescope commented on May 13, 2023

@gilescope
ContributorAuthor
github-actions

github-actions commented on Sep 22, 2023

@github-actions

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 commented on Sep 27, 2023

@github-actions

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Participants

      @gilescope@simbleau@ActuallyHappening

      Issue actions

        Can trunk serve examples? · Issue #423 · trunk-rs/trunk