rust-lang / rust

Empowering everyone to build reliable and efficient software.
https://www.rust-lang.org
Other
98.33k stars 12.72k forks source link

`std::sys` configurability #113410

Open mkroening opened 1 year ago

mkroening commented 1 year ago

In https://github.com/rust-lang/rust/pull/113358, I tried to add a check for poll returning ENOSYS to the runtime initialization path of Linux.

The use-case was adding a target for the Unikraft Unikernel Development Kit, which does not support poll, in its most basic configuration and instead stubs it, returning ENOSYS.

@workingjubilee proposed in https://github.com/rust-lang/rust/pull/113358#issuecomment-1622441912 that we might want to make sys easier to configure according to different target's capabilities (even from target-spec.json).

@rustbot label: +A-technical-debt

mkroening commented 1 year ago

I just opened https://github.com/rust-lang/rust/pull/113411, where I added a Unikraft-specific cfg.