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

Passing command line arguments to application? #399

Closed
CohenArthur opened this issue Jun 20, 2022 · 2 comments
Closed

Passing command line arguments to application? #399

CohenArthur opened this issue Jun 20, 2022 · 2 comments
Labels

Comments

@CohenArthur
Copy link

Hi everyone, I might be going the wrong way about this but I am trying to have my web-app get launched with command line arguments. Specifically, I'm looking for a way to specify the API's URL to use, so that you could do something like this:

> trunk serve --open # default API URL, hardcoded in the binary
> trunk serve --open -- --api-url="woopdidoop.gov"

I can't for the life of me figure out how to get trunk to pass these arguments to the underlying web-app. I've looked at the various hooks and the trunk.toml example file, but nothing struck me. Am I missing something obvious?

It seems that it should be possible, considering that clap works with WASM or that the WASI specification allows it. Is that not the preferred way to go about it?

If it isn't implemented yet, I'd love to try and help wherever I can should you choose to add that :)

Thanks a lot for working on this project, it's been a blast to use and made Rust + WASM super easy to do even for a complete web noob like me.

@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 25, 2023
@github-actions
Copy link

github-actions bot commented Oct 1, 2023

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 Oct 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant