-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
34 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
- Feature Name: main_reexport | ||
- Start Date: 2015-08-19 | ||
- RFC PR: (leave this empty) | ||
- Rust Issue: (leave this empty) | ||
|
||
# Summary | ||
|
||
Allow a re-export of a function as entry point `main`. | ||
|
||
# Motivation | ||
|
||
Functions and re-exports of functions usually behave the same way, but they do | ||
not for the program entry point `main`. This RFC aims to fix this inconsistency. | ||
|
||
The above mentioned inconsistency means that e.g. you currently cannot use a | ||
library's exported function as your main function. | ||
|
||
# Detailed design | ||
|
||
Use the symbol `main at the top-level of a crate that is compiled as a program | ||
(`--crate-type=bin`) – instead of explicitly only accepting directly-defined | ||
functions, also allow re-exports. | ||
|
||
# Drawbacks | ||
|
||
None. | ||
|
||
# Alternatives | ||
|
||
None. | ||
|
||
# Unresolved questions | ||
|
||
None. |