main.rs 598 B

1234567891011121314151617
  1. //! `srt-win` standalone binary — a thin shim over the library's
  2. //! [`srt_win::run_from_args`] CLI entry point. The dispatch lives in
  3. //! `cli.rs` so an embedding multicall binary can link the crate and
  4. //! route to it when `argv[1] == srt_win::SRT_WIN_DISPATCH_ARG1`
  5. //! without shipping a separate executable. See `cli.rs` for why
  6. //! dispatch keys on `argv[1]`, not `argv[0]`, on Windows.
  7. #[cfg(windows)]
  8. fn main() {
  9. std::process::exit(srt_win::run_from_args(std::env::args_os()));
  10. }
  11. #[cfg(not(windows))]
  12. fn main() {
  13. eprintln!("srt-win: Windows only");
  14. std::process::exit(2);
  15. }