Hands-on Rust: Build depending on bracket-lib fails

Hi,
build fails on:

bracket-lib = “~0.8.1”

when running on Mac Mini M1 Rust version 1.5.0:

Compiling winit v0.22.2
error[E0308]: mismatched types
→ .cargo/registry/src/github.com-1ecc6299db9ec823/winit-0.22.2/src/platform_impl/macos/util/async.rs:170:55
|
170 | ns_window.setFrame_display_(new_rect, 0);
| ^ expected bool, found integer

error[E0308]: mismatched types
→ .cargo/registry/src/github.com-1ecc6299db9ec823/winit-0.22.2/src/platform_impl/macos/view.rs:391:9
|
386 | extern “C” fn has_marked_text(this: &Object, _sel: Sel) → BOOL {
| ---- expected bool because of return type

391 | (marked_text.length() > 0) as i8
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected bool, found i8

error[E0308]: mismatched types
→ .cargo/registry/src/github.com-1ecc6299db9ec823/winit-0.22.2/src/platform_impl/macos/window.rs:631:22
|
631 | is_zoomed != 0
| ^ expected bool, found integer

error[E0308]: mismatched types
→ .cargo/registry/src/github.com-1ecc6299db9ec823/winit-0.22.2/src/platform_impl/macos/window.rs:1119:48
|
1119 | window.setFrame_display_(current_rect, 0)
| ^ expected bool, found integer

error[E0308]: mismatched types
→ .cargo/registry/src/github.com-1ecc6299db9ec823/winit-0.22.2/src/platform_impl/macos/window.rs:1126:48
|
1126 | window.setFrame_display_(current_rect, 0)
| ^ expected bool, found integer

error[E0308]: mismatched types
→ .cargo/registry/src/github.com-1ecc6299db9ec823/winit-0.22.2/src/platform_impl/macos/window.rs:1143:48
|
1143 | window.setFrame_display_(current_rect, 0)
| ^ expected bool, found integer

error[E0308]: mismatched types
→ .cargo/registry/src/github.com-1ecc6299db9ec823/winit-0.22.2/src/platform_impl/macos/window.rs:1150:48
|
1150 | window.setFrame_display_(current_rect, 0)
| ^ expected bool, found integer

error: aborting due to 7 previous errors

For more information about this error, try rustc --explain E0308.
error: could not compile winit

Is there any way to solve?

Thanks!

Hi!

Good news: I’ve been working hard on this one. I expect the final crate release early next week. The M1 chip broke a couple of underlying dependencies, which have since updated to work with it.

In the meantime, open your Cargo.toml file and replace the bracket-lib line with:

bracket-lib = { git = "https://github.com/thebracket/bracket-lib.git" }

You may then want to run cargo update to have Cargo re-check all of the dependency versions.

The next release is being tracked in this github issue. I’ve had positive reports from most of the “awaiting confirmation” bugs, so I’m pretty confident that it’ll ship very soon.

Thanks!

1 Like