Mmm

Mmm

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!

Marked As Solved

herbert

herbert

Author of Hands-on Rust

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!

Popular Prag Prog topics Top

kuroneko
Whilst the author has been careful to provide exact results for the tests elsewhere in the book (such as surds with the transformation te...
New
belgoros
Following the steps described in Chapter 6 of the book, I’m stuck with running the migration as described on page 84: bundle exec sequel...
New
jeffmcompsci
Title: Design and Build Great Web APIs - typo “https://company-atk.herokuapp.com/2258ie4t68jv” (page 19, third bullet in URL list) Typo:...
New
conradwt
First, the code resources: Page 237: rumbl_umbrella/apps/rumbl/mix.exs Note: That this file is missing. Page 238: rumbl_umbrella/app...
New
leonW
I ran this command after installing the sample application: $ cards add do something --owner Brian And got a file not found error: Fil...
New
adamwoolhether
I’m not quite sure what’s going on here, but I’m unable to have to containers successfully complete the Readiness/Liveness checks. I’m im...
New
hazardco
On page 78 the following code appears: <%= link_to ‘Destroy’, product, class: ‘hover:underline’, method: :delete, data: { confirm...
New
akraut
The markup used to display the uploaded image results in a Phoenix.LiveView.HTMLTokenizer.ParseError error. lib/pento_web/live/product_l...
New
andreheijstek
After running /bin/setup, the first error was: The foreman' command exists in these Ruby versions: That was easy to fix: gem install fore...
New
bjnord
Hello @herbert ! Trying to get the very first “Hello, Bracket Terminal!" example to run (p. 53). I develop on an Amazon EC2 instance runn...
New

Other popular topics Top

axelson
I’ve been really enjoying obsidian.md: It is very snappy (even though it is based on Electron). I love that it is all local by defaul...
New
brentjanderson
Bought the Moonlander mechanical keyboard. Cherry Brown MX switches. Arms and wrists have been hurting enough that it’s time I did someth...
New
Exadra37
I am a Linux user since 2012, more or less, and I always use Ubuntu on my computers, and my last 2 laptops have been used Thinkpads, wher...
New
Margaret
Hello content creators! Happy new year. What tech topics do you think will be the focus of 2021? My vote for one topic is ethics in tech...
New
Exadra37
I am asking for any distro that only has the bare-bones to be able to get a shell in the server and then just install the packages as we ...
New
foxtrottwist
A few weeks ago I started using Warp a terminal written in rust. Though in it’s current state of development there are a few caveats (tab...
New
PragmaticBookshelf
Build efficient applications that exploit the unique benefits of a pure functional language, learning from an engineer who uses Haskell t...
New
First poster: bot
The overengineered Solution to my Pigeon Problem. TL;DR: I built a wifi-equipped water gun to shoot the pigeons on my balcony, controlle...
New
First poster: bot
Large Language Models like ChatGPT say The Darnedest Things. The Errors They MakeWhy We Need to Document Them, and What We Have Decided ...
New
First poster: bot
zig/http.zig at 7cf2cbb33ef34c1d211135f56d30fe23b6cacd42 · ziglang/zig. General-purpose programming language and toolchain for maintaini...
New

Latest in PragProg

View all threads ❯