49 lines
2.5 KiB
Plaintext
49 lines
2.5 KiB
Plaintext
V is a tool for managing V source code.
|
|
|
|
Usage:
|
|
v [options] [command] [arguments]
|
|
|
|
Examples:
|
|
v hello.v Compile the file `hello.v` and output it as `hello` or `hello.exe`.
|
|
v run hello.v Same as above but also run the produced executable immediately after compilation.
|
|
v -cg run hello.v Same as above, but make debugging easier (in case your program crashes).
|
|
v -o h.c hello.v Translate `hello.v` to `h.c`. Do not compile further.
|
|
|
|
V supports the following commands:
|
|
* New project scaffolding:
|
|
new Setup the file structure for a V project (in a sub folder).
|
|
init Setup the file structure for an already existing V project.
|
|
* Ordinary development:
|
|
run Compile and run a V program.
|
|
test Run all test files in the provided directory.
|
|
fmt Format the V code provided.
|
|
vet Report suspicious code constructs.
|
|
doc Generate the documentation for a V module.
|
|
vlib-docs Generate and open the documentation of all the vlib modules.
|
|
repl Run the REPL.
|
|
* Installation/self updating:
|
|
symlink Create a symbolic link for V.
|
|
up Run the V self-updater.
|
|
self [-prod] Run the V self-compiler, use -prod to optimize compilation.
|
|
version Print the version text and exits.
|
|
* Module/package management:
|
|
install Install a module from VPM.
|
|
remove Remove a module that was installed from VPM.
|
|
search Search for a module from VPM.
|
|
update Update an installed module from VPM.
|
|
upgrade Upgrade all the outdated modules.
|
|
list List all installed modules.
|
|
outdated Show installed modules that need updates.
|
|
* Others:
|
|
doctor Display some usefull info about your system to help reporting bugs.
|
|
translate Translate C code to V (coming soon in 0.3).
|
|
tracev Produce a tracing version of the v compiler.
|
|
Use `tracev yourfile.v` when the compiler panics.
|
|
NB: `tracev` is much slower and more verbose than ordinary `v`
|
|
|
|
Use "v help <command>" for more information about a command, example: `v help build`, `v help build-c`
|
|
Use "v help other" to see less frequently used commands.
|
|
|
|
Note: Help is required to write more help topics.
|
|
Only build, doc, fmt, run, test, search, install, remove, update, bin2v, check-md are properly documented currently.
|