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

Compile Time Execution #732

Closed
5nyper opened this issue Jan 24, 2015 · 7 comments
Closed

Compile Time Execution #732

5nyper opened this issue Jan 24, 2015 · 7 comments

Comments

@5nyper
Copy link

5nyper commented Jan 24, 2015

Any plans on implementing this in Rust? nimlang has this cool feature and Im wondering if Rust will have it soon.

@DiamondLovesYou
Copy link

You can already do it with a macro implemented in a compiler plugin.

@5nyper
Copy link
Author

5nyper commented Jan 25, 2015

Thats not as General as a full CTFE though.

@codyps
Copy link

codyps commented Jan 25, 2015

And using compiler plugins means we need to split our code that runs at different times into different files, which doesn't help much when we just want to initialize some datastructures that the code is making use of.

(Not to mention that we don't actualy have a documented/stable plugin interface)

@5nyper
Copy link
Author

5nyper commented Jan 25, 2015

Isnt it possible to do it the way Nim does it? http://hookrace.net/blog/what-is-special-about-nim/#run-regular-code-at-compile-time

@reem
Copy link

reem commented Jan 25, 2015

This has been noted by the community many times as a desired post-1.0 feature.

@SimonSapin
Copy link
Contributor

I think this can be closed in favor of #911

@petrochenkov
Copy link
Contributor

MIRI is merged into rustc and is will be used for all const evaluation soon (rust-lang/rust#46882), I don't think there's value in keeping this issue open.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants