Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
86 changes: 73 additions & 13 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 7 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ bin-bindgen = [
"dep:clap",
"dep:wit-bindgen-core",
"dep:wit-bindgen-wrpc-go",
"dep:wit-bindgen-wrpc-test",
"wit-bindgen-wrpc-go/clap",
"wit-bindgen-wrpc-rust/clap",
]
Expand Down Expand Up @@ -82,6 +83,7 @@ wit-bindgen-core = { workspace = true, optional = true }
wit-bindgen-wrpc = { workspace = true }
wit-bindgen-wrpc-go = { workspace = true, optional = true }
wit-bindgen-wrpc-rust = { workspace = true, optional = true }
wit-bindgen-wrpc-test = { workspace = true, optional = true }
wrpc-cli = { workspace = true, optional = true }
wrpc-nats = { workspace = true, optional = true }
wrpc-quic = { workspace = true, optional = true }
Expand Down Expand Up @@ -148,8 +150,10 @@ prettyplease = { version = "0.2.37", default-features = false }
proc-macro2 = { version = "1", default-features = false }
quinn = { version = "0.11.6", default-features = false }
quote = { version = "1", default-features = false }
rayon = { version = "1", default-features = false }
rcgen = { version = "0.14", default-features = false }
redis = { version = "1.2", default-features = false }
regex = { version = "1", default-features = false }
reqwest = { version = "0.13", default-features = false }
rustls = { version = "0.23", default-features = false }
semver = { version = "1", default-features = false }
Expand All @@ -163,6 +167,7 @@ tokio = { version = "1", default-features = false }
tokio-stream = { version = "0.1", default-features = false }
tokio-util = { version = "0.7", default-features = false }
tokio-websockets = { version = "0.13", default-features = false }
toml = { version = "0.8", default-features = false }
tower = { version = "0.5", default-features = false }
tower-http = { version = "0.7", default-features = false }
tracing = { version = "0.1", default-features = false }
Expand All @@ -179,11 +184,12 @@ wasmtime-cli-flags = { version = "45", default-features = false }
wasmtime-wasi = { version = "45", default-features = false }
wasmtime-wasi-http = { version = "45", default-features = false }
wit-bindgen = { version = "0.45", default-features = false }
wit-bindgen-core = { version = "0.40", default-features = false }
wit-bindgen-core = { version = "0.41", default-features = false }
wit-bindgen-wrpc = { version = "0.11", default-features = false, path = "./crates/wit-bindgen" }
wit-bindgen-wrpc-go = { version = "0.13", default-features = false, path = "./crates/wit-bindgen-go" }
wit-bindgen-wrpc-rust = { version = "0.11", default-features = false, path = "./crates/wit-bindgen-rust" }
wit-bindgen-wrpc-rust-macro = { version = "0.11", default-features = false, path = "./crates/wit-bindgen-rust-macro" }
wit-bindgen-wrpc-test = { version = "0.1", default-features = false, path = "./crates/wit-bindgen-test" }
wit-component = { version = "0.252", default-features = false }
wit-parser = { version = "0.227", default-features = false }
wrpc-cli = { version = "0.8", path = "./crates/cli", default-features = false }
Expand Down
3 changes: 0 additions & 3 deletions crates/wit-bindgen-go/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,3 @@ clap = { workspace = true, features = ["derive"], optional = true }
heck = { workspace = true }
wit-bindgen-core = { workspace = true }
wrpc-introspect = { workspace = true }

[dev-dependencies]
test-helpers = { workspace = true }
2 changes: 1 addition & 1 deletion crates/wit-bindgen-go/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ impl From<WithOption> for InterfaceGeneration {
}

#[derive(Debug, Clone)]
#[cfg_attr(feature = "clap", derive(clap::Args))]
#[cfg_attr(feature = "clap", derive(clap::Parser))]
pub struct Opts {
/// Whether or not `gofmt` is executed to format generated code.
#[cfg_attr(feature = "clap", arg(long, default_missing_value = "true", default_value_t = true, num_args = 0..=1, require_equals = true, action = clap::ArgAction::Set))]
Expand Down
72 changes: 0 additions & 72 deletions crates/wit-bindgen-go/tests/codegen.rs

This file was deleted.

13 changes: 13 additions & 0 deletions crates/wit-bindgen-rust-macro/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,10 @@ impl Parse for Config {
.map(|p| p.into_token_stream().to_string())
.collect();
}
Opt::AdditionalDerivesIgnore(list) => {
opts.additional_derive_ignore =
list.into_iter().map(|i| i.value()).collect()
}
Opt::With(with) => opts.with.extend(with),
Opt::GenerateAll => {
opts.generate_all = true;
Expand Down Expand Up @@ -298,6 +302,7 @@ mod kw {
syn::custom_keyword!(bitflags_path);
syn::custom_keyword!(exports);
syn::custom_keyword!(additional_derives);
syn::custom_keyword!(additional_derives_ignore);
syn::custom_keyword!(with);
syn::custom_keyword!(generate_all);
syn::custom_keyword!(generate_unused_types);
Expand All @@ -321,6 +326,7 @@ enum Opt {
BitflagsPath(syn::LitStr),
// Parse as paths so we can take the concrete types/macro names rather than raw strings
AdditionalDerives(Vec<syn::Path>),
AdditionalDerivesIgnore(Vec<syn::LitStr>),
With(HashMap<String, WithOption>),
GenerateAll,
GenerateUnusedTypes(syn::LitBool),
Expand Down Expand Up @@ -380,6 +386,13 @@ impl Parse for Opt {
syn::bracketed!(contents in input);
let list = Punctuated::<_, Token![,]>::parse_terminated(&contents)?;
Ok(Opt::AdditionalDerives(list.iter().cloned().collect()))
} else if l.peek(kw::additional_derives_ignore) {
input.parse::<kw::additional_derives_ignore>()?;
input.parse::<Token![:]>()?;
let contents;
syn::bracketed!(contents in input);
let list = Punctuated::<_, Token![,]>::parse_terminated(&contents)?;
Ok(Opt::AdditionalDerivesIgnore(list.iter().cloned().collect()))
} else if l.peek(kw::with) {
input.parse::<kw::with>()?;
input.parse::<Token![:]>()?;
Expand Down
1 change: 0 additions & 1 deletion crates/wit-bindgen-rust/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ bytes = { workspace = true }
futures = { workspace = true }
serde = { workspace = true, features = ["derive"] }
serde_json = { workspace = true }
test-helpers = { workspace = true }
tokio = { workspace = true }
wit-bindgen-wrpc = { path = "../wit-bindgen" }
wrpc-transport = { workspace = true }
Loading
Loading