Passing command line args to egui app on native and the web. #6460
stonerfish
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Do you pass command line args to your egui apps?
I like clap, but it doesn't work on the web.
So, I made a wrapper for clap that gets the arguments from the command line on native, and gets the arguments from the web url when running your app on web/wasm.
Simple concept, to make it easy to write your command line arg parsing (filling your clap struct) and have it work on the web too. The web args come from the url query strings. I figure if you are making an app for web or native, the query string is prolly not used.

we_clap_egui_demoAnyway, if you are interested, please check out the eframe cli example
My library for helping clap on the web we_clap
Beta Was this translation helpful? Give feedback.
All reactions