We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2ce4090 commit 491c3a5Copy full SHA for 491c3a5
1 file changed
doc/docs.md
@@ -6558,6 +6558,13 @@ fn main() {
6558
V can embed arbitrary files into the executable with the `$embed_file(<path>)`
6559
compile time call. Paths can be absolute or relative to the source file.
6560
6561
+Paths could also use the compile time pseudo variables `@VEXEROOT`,
6562
+`@VMODROOT`, `@DIR`, `$d` and `$env`.
6563
+
6564
+```v ignore
6565
+logo := $embed_file('@VEXEROOT/examples/assets/logo.png')
6566
+```
6567
6568
Note that by default, using `$embed_file(file)`, will always embed the whole content
6569
of the file, but you can modify that behaviour by passing: `-d embed_only_metadata`
6570
when compiling your program. In that case, the file will not be embedded. Instead,
0 commit comments