Skip to content

All tools should be libraries #3543

Closed
Closed
@brson

Description

@brson

I want to be able to access cargo and rustdoc as libraries. We should just get in the habit of making everything a library.

Here is what I would like:

  • src/rustc becomes src/librustc - It's already a library, but is structured oddly.
  • src/cargo -> src/libcargo
  • src/rustdoc -> src/librustdoc
  • src/fuzzer -> src/libfuzzer
  • Add driver/driver.rs

driver.rs looks like this

#[cfg(rustc)]
extern mod self = rustc(vers = "0.4");

#[cfg(rustdoc)]
extern mod self = rustdoc(vers = "0.4");

...

fn main() { self::main() }

We may also want some way to include the appropriate per-application crate attributes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-cleanupCategory: PRs that clean code up or issues documenting cleanup.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions