2020-01-08 19:57:41 +03:00
|
|
|
# V preludes:
|
|
|
|
|
2020-02-09 12:08:04 +03:00
|
|
|
The cmd/tools/preludes/ contains small v code snippets, that V uses when
|
2020-01-08 19:57:41 +03:00
|
|
|
compiling certain v programs. V adds the files below automatically itself.
|
|
|
|
Each file is used in different situations (see below).
|
|
|
|
|
|
|
|
NB: preludes are *NOT* intended to be used by user programs/modules.
|
2020-02-09 12:08:04 +03:00
|
|
|
The folder cmd/tools/preludes/ is *NOT* a v module.
|
2020-01-08 19:57:41 +03:00
|
|
|
|
|
|
|
## Details:
|
|
|
|
|
2020-02-09 12:08:04 +03:00
|
|
|
### cmd/tools/preludes/live_main.v
|
2020-01-08 19:57:41 +03:00
|
|
|
Used when compiling live programs. This file is used by the main executable
|
|
|
|
live program, that starts the file change monitoring thread. Each live program
|
|
|
|
needs module `os` and module `time`, in order for the background file change
|
|
|
|
monitoring thread to work properly.
|
|
|
|
|
2020-02-09 12:08:04 +03:00
|
|
|
### cmd/tools/preludes/live_shared.v
|
2020-01-08 19:57:41 +03:00
|
|
|
Used when compiling live programs, for the shared library portion of the live
|
|
|
|
programs, that is reloaded each time the code is changed.
|
|
|
|
|
2020-02-09 12:08:04 +03:00
|
|
|
### cmd/tools/preludes/tests_assertions.v
|
2020-01-08 19:57:41 +03:00
|
|
|
Used when compiling `_test.v` programs.
|
|
|
|
It specifies how failed assertions will look.
|
|
|
|
|
2020-02-09 12:08:04 +03:00
|
|
|
### cmd/tools/preludes/tests_with_stats.v
|
2020-01-08 19:57:41 +03:00
|
|
|
Used when compiling `_test.v` programs with -stats option.
|
|
|
|
It specifies how the result will appear ('assert' vs 'asserts' and so on).
|