top | item 46619074

(no title)

jarjoura | 1 month ago

Wouldn't C++ and Rust eventually call down into those same libc functions?

I guess for your example, qsort() it is optional, and you can chose another implementation of that. Though I tend to find that both standard libraries tend to just delegate those lowest level calls to the posix API.

discuss

order

steveklabnik|1 month ago

Rust doesn't call into libc for sort, it has its own implementation in the standard library.

oguz-ismail2|1 month ago

Obviously. How about more complex things like multi-threading APIs though? Can the Rust compiler determine that the subject program doesn't need TLS and produce a binary that doesn't set it up at all, for example?

adgjlsfhk1|1 month ago

Many of the libc functions are bad apis with traditionally bad implementations.