Adding feature like filter or categorization option to crates.io

Case study: Most of the shopping site like Amazon,Flipkart have option to categorization or filtering producing based on customer requirements like Rating,Brand,Price range etc which can found at left hand side of the screen in most of the case eg:

My proposal is about adding such type of feature like filtering and categorization libries in crate.io

eg :

  • Target operating system

    • Windows
    • Linux
    • Mac
    • Android
  • Target architecture

  • Arm64

  • Arm32

  • x86

  • x32

  • Category

    • Gui
    • machine learning
    • data science
    • Embedded
    • non std
    • algorithm
    • othe r
  • License

    • MIT
    • Apache 2.0
    • gnu
  • Ordering

    • Test pass
    • alphabet
    • downloads

You may have the double that Rust code will run in different platform and use LLVM Technology, and you can find this type of detail using tag and documentation of package available in crates.io why is this type of feature

Some time rust contain FFI library or Api that available only to a particular operating system and Architecture or sometime a library is only build for a particular operating system which develop forget to specifies in document or tag of a package or library

eg Rust library build using Direct X or win32 ui which available only in windows

Data for filtering purpose or categorization of library can be obtained form cargo.toml file or from the developer by asking during uploading package to crate.io

you can add such type of feature as a side bar , pop up page,slide down section which completely depend on ui/ux designer

you can find some categorization features when you enter in to the home page of crates.io like New Crates,Most Downloaded.Just Updated,Most Recent Downloads etc

i already posted this in crates.io issue section

i wand a feedback whether it will be a good idea because i didn't see any filtering or categorization option in any other package manager like npm,yarn,pip,hex

2 Likes

The web side sounds fine, but where does the information live? Are developers going to have to specify categorization akin to PyPI's classifiers? There would need to be a process for adding new categories to the "blessed" list (unless it's going to be a free-for-all as keywords are today).

I'm in favor of the idea, but I think there needs to be some consideration of where the requisite data will live and how it will be specified first.

1 Like

i first thought that information form the cargo.toml can use as source of data but that is not enough we should ask the developer to fill a forum to get required data,but i don't :thinking: think this will be the best way to get data form use, There will be a better way to do this

What about collecting data from .yml file used for git action

FWIW, not everyone uses GitHub Actions (or is on GitHub or even using Git).

you are right not everyone uses GitHub Actions but you should need Github account for hosting library in cargo.io

i feel using forum is better option

For https://lib.rs I've automatically assigned crates to categories based on their keywords. And automatically extracted keywords from descriptions and readmes for the crates that didn't have them.

Supported target platforms and architectures can be guessed via:

  • dependencies (e.g. does it use winapi)
  • presence of cfg(platform) in Cargo.toml and the code
  • running cargo check --target=…

License is already available.

Please never sort any ranking alphabetically. The a crate isn't the best of all Rust crates.

4 Likes