Skip to content

Add support for alternative C libraries #7283

Description

@brson

Makes snapshots more compatible. Required for microcontroller Rust. musl is the favorite.

Activity

  1. vi commented on Jul 11, 2013

    @vi
    Contributor

    Vote up. I don't want musl-gcc (or similar things) to be the sole way to create little system stand-alone executables. I hope it will mix well with https://github.com/pcwalton/zero.rs

  2. thestinger commented on Jul 11, 2013

    @thestinger
    Contributor

    We can eventually avoid the libc dependency completely in runtime-less Rust. It's not very hard to do system calls natively on x86 (interrupts) and x86_64 (syscall instruction). We would also need to support using the vdso to avoid unnecessary overhead on operations like checking the time, because those are optimized to read kernel-space memory without a context-switch.

  3. vi commented on Jul 11, 2013

    @vi
    Contributor

    Mixed "little C library + little Rust runtime" can also be helpful, for projects using both C and Rust code.

    Ideally it should be flexible: the more features you use, the more runtime and dependencies the program have.

  4. catamorphism commented on Sep 2, 2013

    @catamorphism
    Contributor

    Visiting for bug triage. Not a release blocker IMO.

  5. emberian commented on Jan 6, 2014

    @emberian
    Contributor

    Triage. Easy to do with #[no_std], I don't think it should be a priority atm.

  6. thestinger commented on Jan 25, 2014

    @thestinger
    Contributor

    #2124 would make this very easy. In fact, it will probably just work out-of-the-box with most alternative C libraries if we did that.

  7. alexchandel commented on Dec 3, 2014

    @alexchandel

    Rust currently depends on gcc_s for task unwinding on linux and bsd. Dropping this dependency is necessary for systems without glibc/gcc.

  8. vi commented on Dec 3, 2014

    @vi
    Contributor

    Is task unwinding only for debugging and/or error handling, or it is needed for any Rust code to run?

  9. alexchandel commented on Dec 6, 2014

    @alexchandel

    @vi Task unwinding is only for handling panics in the calling task. It is debatable whether this is even the correct behavior.

  10. steveklabnik commented on Jan 21, 2015

    @steveklabnik
    Contributor

    I'm pulling a massive triage effort to get us ready for 1.0. As part of this, I'm moving stuff that's wishlist-like to the RFCs repo, as that's where major new things should get discussed/prioritized.

    This issue has been moved to the RFCs repo: rust-lang/rfcs#625

  11. added a commit that references this issue on Jun 3, 2021
  12. added a commit that references this issue on Aug 21, 2026
    9eb37fb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-runtimeArea: std's runtime and "pre-main" init for handling backtraces, unwinds, stack overflows

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions