EMRUN(1)

🌸 NAME 🌸

emrun β€” the emscripten tool that compiles your stuff into an HTML page, bestie. It's in section 1 of the manual (user commands, obvs), and it's literally the thing you call when you want your build to just run.


✨ DESCRIPTION ✨

okay so here's the whole vibe:

usage: emrun [emrun_options] filename.html -- [html_cmdline_options]

where emrun_options specifies command line options for emrun itself, whereas html_cmdline_options specifies startup arguments to the program. Two completely different crowds of arguments, same party. πŸŽ€

🫢 real talk: if you're seeing "unrecognized arguments" when trying to pass arguments to your page, remember to add -- between arguments to emrun itself and arguments to your page. That little double-dash is the velvet rope, no cap. It keeps the emrun-side args and the page-side args from mixing, because they do NOT belong in the same pile.

πŸ¦‹ positional arguments:

  • serve, cmdlineparams β€” the positionals, hanging out right there in the synopsis.

πŸ‘‘ options:

  • -h, --help β€” show this help message and exit. The classic. It's giving "emergency exit but make it informative". πŸ’…
  • --kill-start β€” If true, any previously running instances of the target browser are killed before starting. Cleaning house before the main character walks in. 🧹
  • --kill-exit β€” If true, the spawned browser process is forcibly killed when it calls exit(). ⚠️ Note: Using this option may require explicitly passing the option --browser=/path/to/browser, to avoid emrun being detached from the browser process it spawns. It's giving "we need to keep our hands on the wheel or we lose the car." 😭
  • --no-server β€” If specified, a HTTP web server is not launched to host the page to run. No server era, apparently. πŸ™ˆ
  • --no-browser β€” If specified, emrun will not launch a web browser to run the page. So it just... does the rest and lets you handle the browser situation yourself. Respect. ✨
  • --no-emrun-detect β€” If specified, skips printing the warning message if html page is detected to not have been built with --emrun linker flag. Basically: stop telling me, I KNOW. πŸ’€
  • --serve-after-close β€” If true, serves the web page even after the application quits by user closing the web page.
  • --serve-after-exit β€” If true, serves the web page even after the application quits by a call to exit().
  • --serve-root SERVE_ROOT β€” If set, specifies the root path that the emrun web server serves. If not specified, the directory where the target .html page lives in is served. So the default is "wherever your page is at," and this flag is you overriding that. 🏠
  • --verbose β€” Enable verbose logging from emrun internal operation. It will tell you everything. Every little thought it has. πŸ—£οΈ
  • --hostname HOSTNAME β€” Specifies the hostname the server runs in.
  • --port PORT β€” Specifies the port the server runs in.
  • --log-stdout LOG_STDOUT β€” Specifies a log filename where the browser process stdout data will be appended to. Appended, not overwritten β€” the receipts pile up. πŸ“
  • --log-stderr LOG_STDERR β€” Specifies a log filename where the browser process stderr data will be appended to. Same deal, but for the screaming. 😭
  • --silence-timeout SILENCE_TIMEOUT β€” If no activity is received in this many seconds, the browser process is assumed to be hung, and the web server is shut down and the target browser killed. Disabled by default. πŸ’€ Silence = suspicion, apparently.
  • --timeout TIMEOUT β€” If the browser process does not quit or the page exit() in this many seconds, the browser is assumed to be hung, and the web server is shut down and the target browser killed. Disabled by default. It's the "you have until the count of this many seconds" option, fr fr.
  • --timeout-returncode TIMEOUT_RETURNCODE β€” Sets the exit code that emrun reports back to caller in the case that a page timeout occurs. Default: 99999. Yes, that number is real, and honestly? Iconic. πŸ”₯
  • --list-browsers β€” Prints out all detected browser that emrun is able to use with the --browser command and exits. Browser roll call, everybody say present. πŸ‘‘
  • --browser BROWSER β€” Specifies the browser executable to run the web page in.
  • --browser-args BROWSER_ARGS β€” Specifies the arguments to the browser executable. Pimp my browser. πŸ’…
  • --android β€” Launches the page in a browser of an Android device connected to an USB on the local system. (via adb) πŸ“±
  • --android-tunnel β€” Expose the port directly to the Android device and connect to it as localhost, establishing cross origin isolation. Implies --android. A reverse socket connection is created by adb reverse, and remains after emrun terminates (it can be removed by adb reverse --remove). ⚠️ Heads up: it does not clean up after itself, so that tunnel is still there after emrun dips. That's your job, bestie.
  • --system-info β€” Prints information about the current system at startup. Vibe check on the machine itself. πŸ–₯️
  • --browser-info β€” Prints information about the target browser to launch at startup. Vibe check on the browser. 🌐
  • --json β€” If specified, --system-info and --browser-info are output in JSON format. Machine-readable flavor of the same tea. πŸ“¦
  • --safe-firefox-profile β€” If true, the browser is launched into a new clean Firefox profile that is suitable for unattended automated runs. (If target browser != Firefox, this parameter is ignored) 🦊 Clean slate, no old cookies haunting the place.
  • --private-browsing β€” If specified, opens browser in private/incognito mode. 🀫 What happens in the profile stays in the profile.
  • --dump-out-directory DUMP_OUT_DIRECTORY β€” If specified, overrides the directory for dump files using emrun_file_dump method. Where the dumps go, you decide. πŸ—‚οΈ

and that's the whole page, bestie πŸ’œ every flag, every default, every little caveat β€” nothing skipped, nothing invented, we keep the facts exactly as they were and just gave them a personality. 🫢

signing off from emrun 6.0.5+dfsg+~1.41.5, dated August 2026 β€” go run your page, you're doing amazing, mwah πŸŽ€βœ¨

πŸ“¦ where this page comes from