ik1ne / webdriver-downloader

Cli Interface&Library for webdriver download.
MIT License
6 stars 2 forks source link

Refine feature flags #57

Open ik1ne opened 8 months ago

ik1ne commented 8 months ago

webdriver-downloader crate should provide following feature flags: default, native-tls, rustls-tls. The following changes should be made:

  1. The dependency fantoccini, reqwest should be changed to optional dependency without default features.
  2. default feature of webdriver-downloader crate should be native-tls.
  3. Users should have three tls options: none, native, rustls.
  4. None: No features are enabled. fantoccini and reqwest are not compiled and the default implementation of WebdriverVerificationInfo::verify_driver and WebdriverInstallationInfo::download_in_tempdir is erased.
  5. Native: native-tls is enabled(regardless of rustls-tls).
  6. Rustls: rustls-tls is enabled and native-tls is not enabled.
ik1ne commented 8 months ago

About number 5: We might have to emit compile failure if both flags are defined(crates such as reqwest, fantoccini has capability of generating both codes as separate functions but we have to choose one)

ik1ne commented 8 months ago

We might also think about enabling opt-out for ChromedriverInfo and GeckodriverInfo.