Compare commits
4 Commits
v0.0.1
...
2568538cb3
Author | SHA1 | Date | |
---|---|---|---|
2568538cb3 | |||
3096165165 | |||
64a4bc9e48 | |||
6d0a074588 |
24
UNLICENSE
Normal file
24
UNLICENSE
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
This is free and unencumbered software released into the public domain.
|
||||||
|
|
||||||
|
Anyone is free to copy, modify, publish, use, compile, sell, or
|
||||||
|
distribute this software, either in source code form or as a compiled
|
||||||
|
binary, for any purpose, commercial or non-commercial, and by any
|
||||||
|
means.
|
||||||
|
|
||||||
|
In jurisdictions that recognize copyright laws, the author or authors
|
||||||
|
of this software dedicate any and all copyright interest in the
|
||||||
|
software to the public domain. We make this dedication for the benefit
|
||||||
|
of the public at large and to the detriment of our heirs and
|
||||||
|
successors. We intend this dedication to be an overt act of
|
||||||
|
relinquishment in perpetuity of all present and future rights to this
|
||||||
|
software under copyright law.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||||
|
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||||
|
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||||
|
IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
||||||
|
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||||
|
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||||
|
OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
|
||||||
|
For more information, please refer to <https://unlicense.org/>
|
@ -5,7 +5,7 @@ flags:
|
|||||||
-chdir <string> change working directory before codegen
|
-chdir <string> change working directory before codegen
|
||||||
-prefix <string> path prefix for file keys, none by default
|
-prefix <string> path prefix for file keys, none by default
|
||||||
-ignore <string> path globs to ignore (allowed multiple times)
|
-ignore <string> path globs to ignore (allowed multiple times)
|
||||||
-module-name <string> generated module name, main by default
|
-module-name <string> generated module name, 'main' by default
|
||||||
-const-name <string> generated constant name with data, embedfs by default
|
-const-name <string> generated constant name with data, 'embedfs' by default
|
||||||
-no-pub do not make symbols in generated module public
|
-no-pub do not make symbols in generated module public
|
||||||
-force-mimetype set applicetion/octet-stream mime type for unknown files
|
-force-mimetype set 'application/octet-stream' mime type for unknown files
|
||||||
|
@ -38,8 +38,6 @@ fn main() {
|
|||||||
println(generator.generate())
|
println(generator.generate())
|
||||||
}
|
}
|
||||||
|
|
||||||
@[xdoc: 'generate code for embed directories with files into executable.']
|
|
||||||
@[name: 'embedfs']
|
|
||||||
struct FlagConfig {
|
struct FlagConfig {
|
||||||
help bool
|
help bool
|
||||||
chdir string
|
chdir string
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
EmbedFileSystem{
|
EmbedFileSystem{
|
||||||
files: {'assets/example.json': EmbedFile{
|
files: {'assets/example.json': EmbedFile{
|
||||||
data: embed_file.EmbedFileData{ len: 22, path: "assets/example.json", apath: "", uncompressed: 8462c4 }
|
data: embed_file.EmbedFileData{ len: 22, path: "assets/example.json", apath: "", uncompressed: 846284 }
|
||||||
meta: EmbedFileMetadata{
|
meta: EmbedFileMetadata{
|
||||||
key: 'assets/example.json'
|
key: 'assets/example.json'
|
||||||
name: 'example.json'
|
name: 'example.json'
|
||||||
|
@ -12,7 +12,7 @@ fn test_mymod() {
|
|||||||
make_pub: false
|
make_pub: false
|
||||||
}
|
}
|
||||||
os.write_file('assets_generated.v', gen.generate())!
|
os.write_file('assets_generated.v', gen.generate())!
|
||||||
ret := os.execute('sh -c "v run ."')
|
ret := os.execute('${os.quoted_path(@VEXE)} run .')
|
||||||
dump(diff.compare_text(ret.output, expected_out)!)
|
dump(diff.compare_text(ret.output, expected_out)!)
|
||||||
assert ret.output == expected_out
|
assert ret.output == expected_out
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user