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

**URL:** <https://forum.devtalk.com/t/hands-on-rust-build-depending-on-bracket-lib-fails/7009>\
**Category:** PragProg Customers\
**Tags:** question, book-hands-on-rust\
**Created:** [14 February 2021 14:28 UTC](https://forum.devtalk.com/t/hands-on-rust-build-depending-on-bracket-lib-fails/7009 "2021-02-14T14:28:38Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mmm](https://forum.devtalk.com/letter_avatar_proxy/v4/letter/m/0ea827/32.png) [@Mmm](https://forum.devtalk.com/u/Mmm)\
**Post date:** [14 February 2021 14:28 UTC](https://forum.devtalk.com/t/hands-on-rust-build-depending-on-bracket-lib-fails/7009/1 "2021-02-14T14:28:38Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![herbert](https://forum.devtalk.com/user_avatar/forum.devtalk.com/herbert/32/1233_2.png) [@herbert](https://forum.devtalk.com/u/herbert)\
**Post date:** [14 February 2021 14:34 UTC](https://forum.devtalk.com/t/hands-on-rust-build-depending-on-bracket-lib-fails/7009/2 "2021-02-14T14:34:19Z")

</div>

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:

```auto
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](https://github.com/thebracket/bracket-lib/issues/191). I’ve had positive reports from most of the “awaiting confirmation” bugs, so I’m pretty confident that it’ll ship very soon.

Thanks!
