const-eval
const-eval copied to clipboard
home for proposals in and around compile-time function evaluation
**Current proposal/summary: https://github.com/rust-lang/const-eval/issues/20#issuecomment-468657992** # Motivation In order to totally outdo any other constant evaluators out there, it is desirable to allow things like using serde to deserialize e.g. json or...
There are multiple thousand intrinsics for various platforms which users might want to use to speed up their code. It is unrealistic to implement all of these (although a certain...
Spawned off https://github.com/rust-lang/rust/pull/55009#issuecomment-433211317 (a PR making raw pointer to usize casts unsafe and making raw pointer operations unsafe. These `unconst` operations are explained in https://github.com/rust-rfcs/const-eval/blob/master/const_safety.md There is the question of...
Recently [it was pointed out to me](https://github.com/rust-lang/rust/pull/71332#discussion_r413740997) that there is an entire category of const-related soundness concerns that I was unaware of, and that is not mentioned with a single...
With https://github.com/rust-lang/rust/pull/56123, we can bypass const qualification, so we can e.g. write constants that read from interior mutable statics, and probably other things I forgot to think about. Could we...
So my current understanding is that all constants used in types must be well formed. I wasn't able to find any discussion on what exactly that means though :sweat_smile: I...
(Filing this at @oli-obk's request, based on discussions on Zulip.) We should be able to read files within const eval. This is equivalent to doing `include_bytes!` (which we already support...
(Filing this at @oli-obk's request, based on discussions on Zulip. Related to https://github.com/rust-lang/const-eval/issues/44 .) We should be able to get lists of files on the filesystem, within const eval. This...
Is there some deep fundamental reason why that can never work, or is it a limitation of the current (or a former) implementation?
Hi, @oli-obk You asked for use cases so this is on you ;) I think that being able to hash in a const fn is a needed use case in...