~repos /rust-embed

#rust#proc-macro#http

git clone https://pyrossh.dev/repos/rust-embed.git
Discussions: https://groups.google.com/g/rust-embed-devs

rust macro which loads files into the rust binary at compile time during release and loads the file from the fs during dev.


Files changed (4) hide show
  1. .gitignore +3 -0
  2. .vscode/settings.json +0 -82
  3. Cargo.toml +0 -1
  4. src/lib.rs +1 -3
.gitignore CHANGED
@@ -1,2 +1,5 @@
1
1
  target
2
2
  Cargo.lock
3
+
4
+ .vscode
5
+ .idea
.vscode/settings.json DELETED
@@ -1,82 +0,0 @@
1
- {
2
- "editor.tabSize": 2,
3
- "editor.fontSize": 15,
4
- "editor.wordWrapColumn": 160,
5
- "editor.minimap.enabled": false,
6
- "search.exclude": {
7
- "**/node_modules": true,
8
- "**/bower_components": true,
9
- "**/.git": true,
10
- "**/.DS_Store": true,
11
- "**/__pycache__": true,
12
- "**/target": true,
13
- "**/dist": true,
14
- "**/.expo": true,
15
- "**/.cache": true,
16
- "**/.cache-loader": true,
17
- },
18
- "files.exclude": {
19
- "**/node_modules": true,
20
- "**/.git": true,
21
- "**/.DS_Store": true,
22
- "**/__pycache__": true,
23
- "**/target": true,
24
- "**/dist": true,
25
- "**/.expo": true,
26
- "**/.cache": true,
27
- "**/.cache-loader": true,
28
- },
29
- "files.watcherExclude": {
30
- "**/node_modules": true,
31
- "**/dist": true,
32
- "**/.git/objects/**": true,
33
- "**/node_modules/**": true,
34
- "**/__pycache__": true,
35
- "**/target": true,
36
- "**/.expo": true,
37
- "**/.cache": true,
38
- "**/.cache-loader": true,
39
- },
40
- "workbench.editor.showTabs": false,
41
- "explorer.openEditors.visible": 0,
42
- "gitProjectManager.baseProjectsFolders": [
43
- "~/Code",
44
- ],
45
- "gitProjectManager.openInNewWindow": true,
46
- "window.zoomLevel": 0,
47
- "window.menuBarVisibility": "toggle",
48
- "workbench.iconTheme": "vscode-icons",
49
- "git.confirmSync": false,
50
- "git.enableSmartCommit": true,
51
- "workbench.startupEditor": "newUntitledFile",
52
- "gitlens.advanced.messages": {
53
- "suppressCommitHasNoPreviousCommitWarning": false,
54
- "suppressCommitNotFoundWarning": false,
55
- "suppressFileNotUnderSourceControlWarning": false,
56
- "suppressGitVersionWarning": false,
57
- "suppressLineUncommittedWarning": false,
58
- "suppressNoRepositoryWarning": false,
59
- "suppressResultsExplorerNotice": true,
60
- "suppressUpdateNotice": true,
61
- "suppressWelcomeNotice": false
62
- },
63
- "workbench.colorTheme": "Dracula Soft",
64
- "git.autofetch": true,
65
- "gitlens.keymap": "alternate",
66
- "sqltools.format": {
67
- "indentSize": 2
68
- },
69
- "sqltools.connections": [
70
- {
71
- "name": "Postgres",
72
- "server": "localhost",
73
- "dialect": "PostgreSQL",
74
- "port": 5432,
75
- "database": "postgres",
76
- "username": "postgres",
77
- "askForPassword": false,
78
- "password": "postgres",
79
- "connectionTimeout": 300
80
- }
81
- ]
82
- }
Cargo.toml CHANGED
@@ -16,7 +16,6 @@ proc-macro = true
16
16
  [dependencies]
17
17
  syn = "0.11"
18
18
  quote = "0.3"
19
- log = "0.4"
20
19
  walkdir = "2.1.4"
21
20
 
22
21
  rocket = { version = "0.3.6", optional = true }
src/lib.rs CHANGED
@@ -1,6 +1,4 @@
1
1
  #![recursion_limit = "1024"]
2
- #[macro_use]
3
- extern crate log;
4
2
  extern crate proc_macro;
5
3
  #[macro_use]
6
4
  extern crate quote;
@@ -112,7 +110,7 @@ fn impl_rust_embed(ast: &syn::DeriveInput) -> Tokens {
112
110
  panic!("#[derive(RustEmbed)] attribute value must be a string literal");
113
111
  }
114
112
  };
115
- info!("folder: {}", folder_path);
113
+ println!("folder: {}", folder_path);
116
114
  generate_assets(ident, folder_path)
117
115
  }
118
116