CLI WG Berlin

What’s up and what to work on with other teams

  • Survey results!
  • Spoiler: Over 1k responses!
  • Cargo features
  • templates
  • Lang features
  • finalize ? in main

Discussions & Design

  • config handling: files etc
  • crate to handle integration tests
  • (@epage not on site)

Survey results notes

  • A strong majority have written CLI apps in Rust
  • Crate usage
  • Dominating crates:
  • Clap/structopt
  • Logging
  • Otherwise, fairly standard Rust deps

Distribution

learnings from cargo debian guidelines
  • crates.io helpers
  • minimal closure of deps you need
  • idea: package multiple semver incompat version at the same time, don't package multiple semver compat version at the same time
  • package name and version in .so file, like libclap2, libclap3
  • do other distros follow suite?
  • crates.io could help figure out minimal set of versions to minimize set of versions
  • discourage non-^ deps on crates.io
  • document some common guidelines
  • pls use ^ deps
  • pls don’t bump required rustc version in minor releases
  • apps vs libraries
  • reverse deps only track published crates, which are mostly libraries
  • detect sys libs (pkg-config)
  • can we give a better experience then “pls install x, y, z beforehand”
  • requires metadata, see metadeps for pkg-config data
  • find best practice: how to deal with native deps in the context of distribution?
  • first step: have distros/packagers figure it out
  • general best practices: don’t depend on network during build, follow good practices for native deps
  • extend cargo install?
  • pascal: oh god no
  • others: man pages, shell autocompletions not so horrible (pascal agrees)
  • build-time generation of those files, e.g. autogenerated by clap
  • maybe do it incrementally with unstable-feature flag/opt-in
  • build.rs could emit a list of files for specific categories
  • helper crates/cargo subcommands to take care of these files
  • custom cargo-subcommands to unify build tools? template? generate an install.rs?