From 802fc7b6580fc943240bd72debea712e2e94d3af Mon Sep 17 00:00:00 2001 From: lifegpc Date: Tue, 17 May 2022 15:20:33 +0800 Subject: [PATCH] Fix build scripts not build --- .gitignore | 1 + Cargo.lock | 11 +++++++++-- Cargo.toml | 8 +------- proc_macros/Cargo.toml | 15 +++++++++++++++ {src => proc_macros}/proc_macros.rs | 0 src/main.rs | 1 + 6 files changed, 27 insertions(+), 9 deletions(-) create mode 100644 proc_macros/Cargo.toml rename {src => proc_macros}/proc_macros.rs (100%) diff --git a/.gitignore b/.gitignore index 5973000..184feba 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ /target +/proc_macros/target .vscode/ test/ diff --git a/Cargo.lock b/Cargo.lock index 795c9be..af78170 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1142,11 +1142,10 @@ dependencies = [ "json", "lazy_static", "link-cplusplus", - "quote", + "proc_macros", "regex", "reqwest", "spin_on", - "syn", "tokio", "urlparse", "utf16string", @@ -1177,6 +1176,14 @@ dependencies = [ "unicode-xid", ] +[[package]] +name = "proc_macros" +version = "0.0.1" +dependencies = [ + "quote", + "syn", +] + [[package]] name = "quote" version = "1.0.15" diff --git a/Cargo.toml b/Cargo.toml index 2a54a6f..1fd2918 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -5,11 +5,6 @@ edition = "2018" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html -[lib] -name = "proc_macros" -path = "src/proc_macros.rs" -proc-macro = true - [dependencies] atty = "0.2" c_fixed_string = { version = "0.2", optional = true } @@ -25,12 +20,11 @@ indicatif = "0.17.0-rc.10" int-enum = "0.4" json = "0.12" lazy_static = "1.4" -quote = "1" +proc_macros = { path = "proc_macros" } regex = "1" reqwest = { version = "0.11", features = ["brotli", "deflate", "gzip", "rustls-tls", "socks", "stream"] } RustyXML = "0.3" spin_on = "0.1.1" -syn = "1" tokio = { version = "1.18", features = ["rt", "macros", "rt-multi-thread", "time"] } urlparse = "0.7" utf16string = { version= "0.2", optional = true } diff --git a/proc_macros/Cargo.toml b/proc_macros/Cargo.toml new file mode 100644 index 0000000..68ca6f6 --- /dev/null +++ b/proc_macros/Cargo.toml @@ -0,0 +1,15 @@ +[package] +name = "proc_macros" +version = "0.0.1" +edition = "2018" + +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html + +[lib] +name = "proc_macros" +path = "proc_macros.rs" +proc-macro = true + +[dependencies] +quote = "1" +syn = "1" diff --git a/src/proc_macros.rs b/proc_macros/proc_macros.rs similarity index 100% rename from src/proc_macros.rs rename to proc_macros/proc_macros.rs diff --git a/src/main.rs b/src/main.rs index 4ed855e..05fe7dd 100644 --- a/src/main.rs +++ b/src/main.rs @@ -14,6 +14,7 @@ extern crate int_enum; extern crate lazy_static; #[cfg(all(feature = "link-cplusplus", target_env = "gnu"))] extern crate link_cplusplus; +extern crate proc_macros; extern crate tokio; extern crate regex; extern crate reqwest;