File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -3266,6 +3266,19 @@ fn main() {
3266
3266
* You can create modules anywhere.
3267
3267
* All modules are compiled statically into a single executable.
3268
3268
3269
+ ### Special considerations
3270
+
3271
+ For the top level project folder (the one that is compiled with v .), and * only*
3272
+ that folder, you can have several .v files, that may be mentioning different modules
3273
+ with ` module main ` , ` module abc ` etc
3274
+
3275
+ This is to ease the prototyping workflow in that folder:
3276
+ - you can start developing some new project with a single .v file
3277
+ - split functionality as necessary to different .v files in the same folder
3278
+ - when that makes logical sense to be further organised, put them into their own directory module.
3279
+
3280
+ Note that in ordinary modules, all .v files must start with ` module name_of_folder ` .
3281
+
3269
3282
### ` init ` functions
3270
3283
3271
3284
If you want a module to automatically call some setup/initialization code when it is imported,
You can’t perform that action at this time.
0 commit comments