Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

re: feedback request on linkedin #4

Open
waynr opened this issue Dec 25, 2023 · 1 comment
Open

re: feedback request on linkedin #4

waynr opened this issue Dec 25, 2023 · 1 comment

Comments

@waynr
Copy link
Contributor

waynr commented Dec 25, 2023

Here are some notes I jotted down will perusing your code, broken down by "make it easier to use", "make it easier to develop", and "make it easier to distribute". I'll also open a couple quick PRs to address a couple of these points after I open this issue.

make it easier to develop

  • main branch should build with stable rust
  • put all nightly feature usage into a lightweight "nightly-changes" (or
    whatever you want to call it) branch
  • create sub-crate that offers a nice public library api
  • consider using an existing library for command line argument parsing
    • this will reduce the time you spend working on your own custom argument
      parsing and make it
    • clap to simplify your life when it
  • prioritize documenting your types, especially obviously important traits like DataSink and Finalizable
  • push docs to docr.rs (once you've written some)
  • push crates to crates.io

make it easier to use

  • commit to some kind of stable but evolveable command line api
    • main command line api should require few options to get good average use
      case behaviors
    • make it easy to stray outside the lines with compression, encryption, and
      network parameters
    • think of the difference between git porcelain and git plumbing
    • flags like --release, --backup, and --check could be subcommands
      • argument parsing should be grouped by applicability to different
        subcommands/modes
      • subcommands make it easier to extend the main cli with additional
        high-level behaviors

make it easier to distribute

  • look into minimizing binary size
    • adding the following to your Cargo.toml brings the binary size down to
      ~682KB:
[profile.release]
lto = true
codegen-units = 1
strip = true
  • allowing for a no_std build could significantly reduce it further (i'm not
    sure though), would be worth a try
  • consider if std is really necessary for all use cases and offer a std feature
    flag or something (you mentioned a target use case is embedded environments
    which may not have standard library could be good for embedded systems, but
    what about embedded systems without access to std?
@waynr
Copy link
Contributor Author

waynr commented Dec 25, 2023

Just opened #5 and #6

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant