Skip to content

Commit 14144ab

Browse files
committed
chore: update wit-bindgen-go revision
Signed-off-by: Andrew Steurer <[email protected]>
1 parent 20420e4 commit 14144ab

File tree

4 files changed

+9
-10
lines changed

4 files changed

+9
-10
lines changed

Cargo.lock

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,6 @@ clap = { version = "4.5.53", features = ["derive"] }
3939
regex = "1.12.2"
4040
wat = { version = "1.243.0"}
4141
# TODO: Update once v0.52.0 releases
42-
wit-bindgen-go = { git = "https://github.com/bytecodealliance/wit-bindgen", rev = "da3f633daf32937823f276046bc20bffbeabb3dc" }
42+
wit-bindgen-go = { git = "https://github.com/bytecodealliance/wit-bindgen", rev = "822fdb1ae6279933be9f0a6b18901adf9997398d" }
4343
wit-component = "0.244.0"
4444
wit-parser = "0.244.0"

src/bindings.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ pub fn generate_bindings(
1111
generate_stubs: bool,
1212
should_format: bool,
1313
output: Option<&Path>,
14-
mod_name: Option<String>,
14+
pkg_name: Option<String>,
1515
) -> Result<()> {
1616
let (resolve, world) = parse_wit(wit_path, world, features, all_features)?;
1717
let mut files = Default::default();
@@ -25,7 +25,7 @@ pub fn generate_bindings(
2525
wit_bindgen_go::Opts {
2626
generate_stubs,
2727
format,
28-
mod_name,
28+
pkg_name,
2929
..Default::default()
3030
}
3131
.build()

src/command.rs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -84,11 +84,10 @@ pub struct Bindings {
8484
#[arg(long)]
8585
pub format: bool,
8686

87-
/// The name of the Go module housing the generated bindings (or "wit_component" if `None`).
88-
///
89-
/// This option is used if the generated bindings will be used as a library.
87+
/// If specified, organize the bindings into a package for use as a library;
88+
/// otherwise (if None), the bindings will be organized for use as a standalone executable.
9089
#[arg(long)]
91-
pub mod_name: Option<String>,
90+
pub pkg_name: Option<String>,
9291
}
9392

9493
pub fn run<T: Into<OsString> + Clone, I: IntoIterator<Item = T>>(args: I) -> Result<()> {
@@ -130,6 +129,6 @@ fn bindings(common: Common, bindings: Bindings) -> Result<()> {
130129
bindings.generate_stubs,
131130
bindings.format,
132131
bindings.output.as_deref(),
133-
bindings.mod_name,
132+
bindings.pkg_name,
134133
)
135134
}

0 commit comments

Comments
 (0)