File tree 1 file changed +34
-0
lines changed
1 file changed +34
-0
lines changed Original file line number Diff line number Diff line change
1
+ - Feature Name: main_reexport
2
+ - Start Date: 2015-08-19
3
+ - RFC PR: (leave this empty)
4
+ - Rust Issue: (leave this empty)
5
+
6
+ # Summary
7
+
8
+ Allow a re-export of a function as entry point ` main ` .
9
+
10
+ # Motivation
11
+
12
+ Functions and re-exports of functions usually behave the same way, but they do
13
+ not for the program entry point ` main ` . This RFC aims to fix this inconsistency.
14
+
15
+ The above mentioned inconsistency means that e.g. you currently cannot use a
16
+ library's exported function as your main function.
17
+
18
+ # Detailed design
19
+
20
+ Use the symbol ` main ` at the top-level of a crate that is compiled as a program
21
+ (` --crate-type=bin ` ) – instead of explicitly only accepting directly-defined
22
+ functions, also allow re-exports.
23
+
24
+ # Drawbacks
25
+
26
+ None.
27
+
28
+ # Alternatives
29
+
30
+ None.
31
+
32
+ # Unresolved questions
33
+
34
+ None.
You can’t perform that action at this time.
0 commit comments