Can you use a rust binary crate as a library?

This page summarizes the projects mentioned and recommended in the original post on /r/rust

Our great sponsors
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • WorkOS - The modern identity platform for B2B SaaS
  • SaaSHub - Software Alternatives and Reviews
  • fd

    A simple, fast and user-friendly alternative to 'find'

  • I'd like to use fd's features in a program I am writing. Is it possible to use a crate with a main.rs and no lib.rs as a library? Is there some trick I can do to make that work?

  • Cargo

    The Rust package manager

  • Crates like bindgen work around #1982 still being unsolved by making the feature for the CLI a default feature and expecting things which depend on the library to opt out of default features.

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

    InfluxDB logo
  • rfcs

    RFCs for changes to Rust

  • As it would be a change to Cargo.toml, it requires an RFC and there's currently one under discussion so the first thing you'd want to do is look through what's been said there.

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts