Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

core wanted features & bugfixes #514

Open
5 of 13 tasks
ojeda opened this issue Oct 11, 2021 · 14 comments
Open
5 of 13 tasks

core wanted features & bugfixes #514

ojeda opened this issue Oct 11, 2021 · 14 comments
Labels
meta Meta issue. • toolchain Related to `rustc`, `bindgen`, `rustdoc`, LLVM, Clippy...

Comments

@ojeda
Copy link
Member

ojeda commented Oct 11, 2021

Features that we would like to see

Required (we almost certainly want them)

Nice to have (not critical, we could workaround if needed, etc.)

Low priority (we will likely not use them in the end)

Done (stabilized, fixed, not needed anymore, etc.)


Bugs that we would like to see fixed

Required (we almost certainly want them)

Nice to have (probably not critical, we could workaround if needed, etc.)

Low priority (we will likely not use them in the end)

Done (stabilized, fixed, or not needed anymore, etc.)

@ojeda ojeda added • toolchain Related to `rustc`, `bindgen`, `rustdoc`, LLVM, Clippy... meta Meta issue. labels Oct 11, 2021
@bjorn3
Copy link
Member

bjorn3 commented Oct 11, 2021

Disabling futures features.

I could only find a single function that is neither generic nor #[inline] for the future handling. This function is very small, so disabling futures in libcore will barely save any space. Generic and #[inline] functions are only codegened when actually used. All disabling futures will do is prevent someone from deliberately using futures and possibly for the current rustc version cause an ICE when trying to use async fn. (haven't checked though)

@fbq
Copy link
Member

fbq commented Oct 11, 2021

Disabling futures features.

All disabling futures will do is prevent someone from deliberately using futures and possibly for the current rustc version cause an ICE when trying to use async fn. (haven't checked though)

Right! I'm experimenting implementing two Contexts backed by the mechanisms of Linux kernel to poll Futures:

  • A kernel thread, Future polled in thread functions and wake means wake up a kernel thread. (I already have a working version)
  • A work item in workqueue, Future polled in work functions and wake means requeue the work item in the workqueue. (Still need to figure out some safe abstraction, but it works in theory).

Future may help kernel developers to refactor (rethink) some async work, so I think it's very important that we support it.

@ojeda
Copy link
Member Author

ojeda commented Oct 11, 2021

I could only find a single function that is neither generic nor #[inline] for the future handling. This function is very small, so disabling futures in libcore will barely save any space. Generic and #[inline] functions are only codegened when actually used. All disabling futures will do is prevent someone from deliberately using futures and possibly for the current rustc version cause an ICE when trying to use async fn. (haven't checked though)

This came from the original list I had in the other issue, where they were examples of the general idea of partitioning core. I agree that it does not make much sense to list it now that they are split as actual items we would like. Removed!

@GKFX
Copy link

GKFX commented Oct 16, 2022

I have opened a PR to remove 128-bit features: rust-lang/rust#103126.

@ojeda
Copy link
Member Author

ojeda commented Oct 18, 2022

Thanks! Added.

@workingjubilee
Copy link

workingjubilee commented Mar 31, 2023

Before we add more cfg, if the goal is mostly a smaller text size, then can we look at just... trying to optimize the actual sizes of things? rust-lang/rust#109216 got a win of ~24KiB in size (and faster, mostly!) by taking a swing at that.

Adding configuration code doesn't necessarily affect statically linked binaries as much, as those will either be stuck with the code also, for each that actually uses it, or dead-code-eliminate it, and statically linked binaries include some of the use-cases that want the smallest size (such as embedded code which isn't running on an OS at all, not even an RTOS, and thus has limited options for dynamic linking and is usually just one blobby image).

@tgross35
Copy link
Collaborator

tgross35 commented Aug 4, 2023

This may come in handy at some point down the line https://github.com/Amanieu/rfcs/blob/core-detect/text/0000-core_detect.md

@fbq
Copy link
Member

fbq commented Dec 7, 2023

Following up the discussion here, I'd like to add two asm wanted features:

Although @nbdd0121 mentioned these should be lang feature instead of core feature. But I haven't found a lang feature issue. Feel free to put it wherever you see fit ;-)

@ojeda
Copy link
Member Author

ojeda commented Dec 7, 2023

Sounds good, thanks! Language features are in #354 (I had asm goto there already, added memory operands too now).

@y86-dev
Copy link
Member

y86-dev commented Jul 17, 2024

@ojeda about the c_stringify! macro, we should probably ask the libs team, since that would be their area.

@ojeda
Copy link
Member Author

ojeda commented Jul 17, 2024

+1, I think @vincenzopalazzo wanted to mention it to the macros working group too.

@tgross35
Copy link
Collaborator

In theory the new macro metavar expression ${concat(c, $str)} might be able to handle it where needed.

@vincenzopalazzo
Copy link

I finally had the time to start discussing the c_stringify! on the wg-macros, if you would like to follow it, please see the zulip discussion

@ojeda
Copy link
Member Author

ojeda commented Sep 1, 2024

Thanks! Added.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
meta Meta issue. • toolchain Related to `rustc`, `bindgen`, `rustdoc`, LLVM, Clippy...
Development

No branches or pull requests

8 participants