mirror of
https://github.com/tauri-apps/tauri-bindgen.git
synced 2026-01-31 00:45:21 +01:00
fix: remove workspace inheritance
This commit is contained in:
48
Cargo.toml
48
Cargo.toml
@@ -1,42 +1,38 @@
|
||||
[package]
|
||||
name = "tauri-bindgen-cli"
|
||||
authors = ["Jonas Kruckenberg <iterpre@protonmail.com>"]
|
||||
version.workspace = true
|
||||
edition.workspace = true
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
|
||||
[workspace]
|
||||
members = ["crates/*"]
|
||||
resolver = "2"
|
||||
|
||||
[workspace.package]
|
||||
edition = "2021"
|
||||
version = "0.1.0"
|
||||
|
||||
[workspace.dependencies]
|
||||
wit-parser = { path = "crates/wit-parser"}
|
||||
tauri-bindgen-core = { path = "crates/bindgen-core"}
|
||||
tauri-bindgen-gen-rust = { path = "crates/gen-rust"}
|
||||
tauri-bindgen-gen-host = { path = "crates/gen-host"}
|
||||
tauri-bindgen-gen-guest-rust = { path = "crates/gen-guest-rust"}
|
||||
tauri-bindgen-gen-guest-ts = { path = "crates/gen-guest-ts"}
|
||||
tauri-bindgen-gen-guest-js = { path = "crates/gen-guest-js"}
|
||||
tauri-bindgen-gen-markdown = { path = "crates/gen-markdown"}
|
||||
heck = { version = "0.4", features = ["unicode"] }
|
||||
clap = { version = "4.0.32", features = ["derive"] }
|
||||
async-trait = "0.1.60"
|
||||
pulldown-cmark = { version = "0.9", default-features = false }
|
||||
bitflags = "1.3.2"
|
||||
tauri = "1.2.3"
|
||||
miette = { version = "5.5.0", features = ["fancy"] }
|
||||
thiserror = "1.0.38"
|
||||
# [workspace.dependencies]
|
||||
# wit-parser = { path = "crates/wit-parser"}
|
||||
# tauri-bindgen-core = { path = "crates/bindgen-core"}
|
||||
# tauri-bindgen-gen-rust = { path = "crates/gen-rust"}
|
||||
# tauri-bindgen-gen-host = { path = "crates/gen-host"}
|
||||
# tauri-bindgen-gen-guest-rust = { path = "crates/gen-guest-rust"}
|
||||
# tauri-bindgen-gen-guest-ts = { path = "crates/gen-guest-ts"}
|
||||
# tauri-bindgen-gen-guest-js = { path = "crates/gen-guest-js"}
|
||||
# tauri-bindgen-gen-markdown = { path = "crates/gen-markdown"}
|
||||
# heck = { version = "0.4", features = ["unicode"] }
|
||||
# clap = { version = "4.0.32", features = ["derive"] }
|
||||
# async-trait = "0.1.60"
|
||||
# pulldown-cmark = { version = "0.9", default-features = false }
|
||||
# bitflags = "1.3.2"
|
||||
# tauri = "1.2.3"
|
||||
# miette = { version = "5.5.0", features = ["fancy"] }
|
||||
# thiserror = "1.0.38"
|
||||
|
||||
[dependencies]
|
||||
clap.workspace = true
|
||||
tauri-bindgen-core.workspace = true
|
||||
tauri-bindgen-core = { path = "../bindgen-core" }
|
||||
tauri-bindgen-gen-host = { workspace = true, features = ['clap'] }
|
||||
tauri-bindgen-gen-markdown = { workspace = true, features = ['clap'] }
|
||||
tauri-bindgen-gen-guest-rust = { workspace = true, features = ['clap'] }
|
||||
tauri-bindgen-gen-guest-ts = { workspace = true, features = ['clap'] }
|
||||
tauri-bindgen-gen-guest-js = { workspace = true, features = ['clap'] }
|
||||
wit-parser.workspace = true
|
||||
miette.workspace = true
|
||||
wit-parser = { path = "../wit-parser" }
|
||||
miette = { version = "5.5.0", features = ["fancy"] }
|
||||
@@ -1,14 +1,14 @@
|
||||
[package]
|
||||
name = "tauri-bindgen-core"
|
||||
version.workspace = true
|
||||
edition.workspace = true
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
|
||||
[dependencies]
|
||||
wit-parser.workspace = true
|
||||
wit-parser = { path = "../wit-parser" }
|
||||
blake3 = { version = "1.3.3", features = ["rayon"] }
|
||||
memmap2 = "0.5.8"
|
||||
rayon = "1.6.1"
|
||||
hex = "0.4.3"
|
||||
thiserror.workspace = true
|
||||
miette.workspace = true
|
||||
bitflags.workspace = true
|
||||
thiserror = "1.0.38"
|
||||
miette = { version = "5.5.0", features = ["fancy"] }
|
||||
bitflags = "1.3.2"
|
||||
|
||||
@@ -1,16 +1,13 @@
|
||||
[package]
|
||||
name = "tauri-bindgen-gen-guest-js"
|
||||
version.workspace = true
|
||||
edition.workspace = true
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
|
||||
[dependencies]
|
||||
tauri-bindgen-core.workspace = true
|
||||
wit-parser.workspace = true
|
||||
heck.workspace = true
|
||||
clap = { workspace = true, optional = true }
|
||||
|
||||
# [dev-dependencies]
|
||||
# anyhow.workspace = true
|
||||
tauri-bindgen-core = { path = "../bindgen-core" }
|
||||
wit-parser = { path = "../wit-parser" }
|
||||
heck = { version = "0.4", features = ["unicode"] }
|
||||
clap = { version = "4.0.32", features = ["derive"], optional = true }
|
||||
|
||||
[features]
|
||||
clap = ["dep:clap"]
|
||||
clap = ["clap"]
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
[package]
|
||||
name = "tauri-bindgen-gen-guest-rust"
|
||||
version.workspace = true
|
||||
edition.workspace = true
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
|
||||
[dependencies]
|
||||
tauri-bindgen-gen-rust.workspace = true
|
||||
tauri-bindgen-core.workspace = true
|
||||
wit-parser.workspace = true
|
||||
heck.workspace = true
|
||||
clap = { workspace = true, optional = true }
|
||||
tauri-bindgen-gen-rust = { path = "../bindgen-gen-rust" }
|
||||
tauri-bindgen-core = { path = "../bindgen-core" }
|
||||
wit-parser = { path = "../wit-parser" }
|
||||
heck = { version = "0.4", features = ["unicode"] }
|
||||
clap = { version = "4.0.32", features = ["derive"], optional = true }
|
||||
|
||||
[dev-dependencies]
|
||||
wasm-bindgen = { version = "0.2.83", features = ["serde-serialize"] }
|
||||
|
||||
@@ -1,16 +1,13 @@
|
||||
[package]
|
||||
name = "tauri-bindgen-gen-guest-ts"
|
||||
version.workspace = true
|
||||
edition.workspace = true
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
|
||||
[dependencies]
|
||||
tauri-bindgen-core.workspace = true
|
||||
wit-parser.workspace = true
|
||||
heck.workspace = true
|
||||
clap = { workspace = true, optional = true }
|
||||
|
||||
# [dev-dependencies]
|
||||
# anyhow.workspace = true
|
||||
tauri-bindgen-core = { path = "../bindgen-core" }
|
||||
wit-parser = { path = "../wit-parser" }
|
||||
heck = { version = "0.4", features = ["unicode"] }
|
||||
clap = { version = "4.0.32", features = ["derive"], optional = true }
|
||||
|
||||
[features]
|
||||
clap = ["dep:clap"]
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
[package]
|
||||
name = "tauri-bindgen-gen-host"
|
||||
version.workspace = true
|
||||
edition.workspace = true
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
|
||||
[dependencies]
|
||||
tauri-bindgen-gen-rust.workspace = true
|
||||
tauri-bindgen-core.workspace = true
|
||||
wit-parser.workspace = true
|
||||
heck.workspace = true
|
||||
clap = { workspace = true, optional = true }
|
||||
tauri-bindgen-gen-rust = { path = "../bindgen-gen-rust" }
|
||||
tauri-bindgen-core = { path = "../bindgen-core" }
|
||||
wit-parser = { path = "../wit-parser" }
|
||||
heck = { version = "0.4", features = ["unicode"] }
|
||||
clap = { version = "4.0.32", features = ["derive"], optional = true }
|
||||
|
||||
[dev-dependencies]
|
||||
# anyhow.workspace = true
|
||||
|
||||
@@ -1,18 +1,18 @@
|
||||
[package]
|
||||
name = "tauri-bindgen-gen-markdown"
|
||||
version.workspace = true
|
||||
edition.workspace = true
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
|
||||
[lib]
|
||||
doctest = false
|
||||
test = false
|
||||
|
||||
[dependencies]
|
||||
heck.workspace = true
|
||||
pulldown-cmark.workspace = true
|
||||
clap = { workspace = true, optional = true }
|
||||
tauri-bindgen-core.workspace = true
|
||||
wit-parser.workspace = true
|
||||
heck = { version = "0.4", features = ["unicode"] }
|
||||
pulldown-cmark.workspace = { version = "0.9", default-features = false }
|
||||
clap = { version = "4.0.32", features = ["derive"], optional = true }
|
||||
tauri-bindgen-core = { path = "../bindgen-core" }
|
||||
wit-parser = { path = "../wit-parser" }
|
||||
|
||||
[features]
|
||||
clap = ["dep:clap"]
|
||||
@@ -1,11 +1,11 @@
|
||||
[package]
|
||||
name = "tauri-bindgen-gen-rust"
|
||||
version.workspace = true
|
||||
edition.workspace = true
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
[dependencies]
|
||||
tauri-bindgen-core.workspace = true
|
||||
wit-parser.workspace = true
|
||||
heck.workspace = true
|
||||
tauri-bindgen-core = { path = "../bindgen-core" }
|
||||
wit-parser = { path = "../wit-parser" }
|
||||
heck = { version = "0.4", features = ["unicode"] }
|
||||
@@ -1,7 +1,7 @@
|
||||
[package]
|
||||
name = "tauri-bindgen-guest-rust-macro"
|
||||
version.workspace = true
|
||||
edition.workspace = true
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
|
||||
[lib]
|
||||
proc-macro = true
|
||||
@@ -9,5 +9,5 @@ proc-macro = true
|
||||
[dependencies]
|
||||
proc-macro2 = "1.0"
|
||||
syn = "1.0"
|
||||
tauri-bindgen-gen-guest-rust.workspace = true
|
||||
tauri-bindgen-gen-guest-rust = { path = "../bindgen-gen-guest-rust" }
|
||||
rust-macro-shared = { path = "../rust-macro-shared" }
|
||||
@@ -1,12 +1,12 @@
|
||||
[package]
|
||||
name = "tauri-bindgen-guest-rust"
|
||||
version.workspace = true
|
||||
edition.workspace = true
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
[dependencies]
|
||||
bitflags.workspace = true
|
||||
bitflags = "1.3.2"
|
||||
tauri-bindgen-guest-rust-macro = { path = "../guest-rust-macro" }
|
||||
serde-wasm-bindgen = "0.4.5"
|
||||
wasm-bindgen-futures = "0.4.33"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
[package]
|
||||
name = "tauri-bindgen-host-macro"
|
||||
version.workspace = true
|
||||
edition.workspace = true
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
|
||||
[lib]
|
||||
proc-macro = true
|
||||
@@ -9,5 +9,5 @@ proc-macro = true
|
||||
[dependencies]
|
||||
proc-macro2 = "1.0"
|
||||
syn = "1.0"
|
||||
tauri-bindgen-gen-host.workspace = true
|
||||
tauri-bindgen-gen-host = { path = "../bindgen-gen-host" }
|
||||
rust-macro-shared = { path = "../rust-macro-shared" }
|
||||
@@ -1,15 +1,15 @@
|
||||
[package]
|
||||
name = "tauri-bindgen-host"
|
||||
version.workspace = true
|
||||
edition.workspace = true
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
[dependencies]
|
||||
bitflags.workspace = true
|
||||
bitflags = "1.3.2"
|
||||
tauri-bindgen-host-macro = { path = "../host-macro" }
|
||||
async-trait = "0.1.60"
|
||||
tauri.workspace = true
|
||||
tauri = "1.2.3"
|
||||
serde = { version = "1.0.152", features = ["derive"] }
|
||||
tracing = { version = "0.1.37", features = ["log", "log-always"] }
|
||||
anyhow = "1.0.68"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
[package]
|
||||
name = "rust-macro-shared"
|
||||
version.workspace = true
|
||||
edition.workspace = true
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
|
||||
[lib]
|
||||
doctest = false
|
||||
@@ -10,5 +10,5 @@ test = false
|
||||
[dependencies]
|
||||
proc-macro2 = "1.0"
|
||||
syn = "1.0"
|
||||
tauri-bindgen-core.workspace = true
|
||||
wit-parser.workspace = true
|
||||
tauri-bindgen-core = { path = "../bindgen-core" }
|
||||
wit-parser = { path = "../wit-parser" }
|
||||
|
||||
@@ -8,11 +8,10 @@ edition = "2021"
|
||||
fst = "0.4.7"
|
||||
|
||||
[dependencies]
|
||||
thiserror.workspace = true
|
||||
thiserror = "1.0.38"
|
||||
id-arena = "2.2.1"
|
||||
codespan-reporting = "0.11.1"
|
||||
miette.workspace = true
|
||||
# fst = { version = "0.4.7", features = ["levenshtein"] }
|
||||
miette = { version = "5.5.0", features = ["fancy"] }
|
||||
distance = "0.4.0"
|
||||
|
||||
[dev-dependencies]
|
||||
|
||||
@@ -186,7 +186,7 @@ impl<'a> Iterator for TokensRaw<'a> {
|
||||
|
||||
let token = match ch {
|
||||
' ' | '\t' | '\n' => {
|
||||
self.take_char_while(is_space);
|
||||
self.take_char_while(char::is_whitespace);
|
||||
Token::Whitespace
|
||||
}
|
||||
'/' => {
|
||||
@@ -200,15 +200,12 @@ impl<'a> Iterator for TokensRaw<'a> {
|
||||
'*' if self.chars.peek().map(|e| e.1) == Some('*') => {
|
||||
let mut depth = 1;
|
||||
while depth > 0 {
|
||||
let (_, ch) = match self.chars.next() {
|
||||
Some(pair) => pair,
|
||||
None => {
|
||||
return Some(Err(Error::unterminated_comment(
|
||||
start,
|
||||
self.src.len() - 1,
|
||||
)
|
||||
.into()))
|
||||
}
|
||||
let Some((_ ,ch)) = self.chars.next() else {
|
||||
return Some(Err(Error::unterminated_comment(
|
||||
start,
|
||||
self.src.len() - 1,
|
||||
)
|
||||
.into()))
|
||||
};
|
||||
match ch {
|
||||
'/' if self.take_char('*') => depth += 1,
|
||||
@@ -225,15 +222,12 @@ impl<'a> Iterator for TokensRaw<'a> {
|
||||
'*' => {
|
||||
let mut depth = 1;
|
||||
while depth > 0 {
|
||||
let (_, ch) = match self.chars.next() {
|
||||
Some(pair) => pair,
|
||||
None => {
|
||||
return Some(Err(Error::unterminated_comment(
|
||||
start,
|
||||
self.src.len() - 1,
|
||||
)
|
||||
.into()))
|
||||
}
|
||||
let Some((_, ch)) = self.chars.next() else {
|
||||
return Some(Err(Error::unterminated_comment(
|
||||
start,
|
||||
self.src.len() - 1,
|
||||
)
|
||||
.into()))
|
||||
};
|
||||
match ch {
|
||||
'/' if self.take_char('*') => depth += 1,
|
||||
@@ -274,7 +268,7 @@ impl<'a> Iterator for TokensRaw<'a> {
|
||||
Token::Id
|
||||
}
|
||||
|
||||
c if is_alphabetic(c) => {
|
||||
c if c.is_alphabetic() => {
|
||||
let start = self.chars.peek().map(|e| e.0 - 1).unwrap_or_default();
|
||||
let len = self
|
||||
.take_char_while(is_identifier)
|
||||
@@ -399,24 +393,9 @@ impl<'a> Iterator for Tokens<'a> {
|
||||
}
|
||||
}
|
||||
|
||||
#[inline]
|
||||
fn is_alphabetic(chr: char) -> bool {
|
||||
('A'..='Z').contains(&chr) || ('a'..='z').contains(&chr)
|
||||
}
|
||||
|
||||
#[inline]
|
||||
fn is_digit(chr: char) -> bool {
|
||||
('0'..='9').contains(&chr)
|
||||
}
|
||||
|
||||
#[inline]
|
||||
fn is_identifier(chr: char) -> bool {
|
||||
is_alphabetic(chr) || is_digit(chr) || chr == '-'
|
||||
}
|
||||
|
||||
#[inline]
|
||||
fn is_space(chr: char) -> bool {
|
||||
chr == ' ' || chr == '\t'
|
||||
chr.is_ascii_alphabetic() || chr.is_ascii_digit() || chr == '-'
|
||||
}
|
||||
|
||||
#[inline]
|
||||
|
||||
1
rust-toolchain
Normal file
1
rust-toolchain
Normal file
@@ -0,0 +1 @@
|
||||
1.59
|
||||
Reference in New Issue
Block a user