Hands-on Rust: Chapter 3: Can't get first hello to run

Hello @herbert ! Trying to get the very first “Hello, Bracket Terminal!" example to run (p. 53). I develop on an Amazon EC2 instance running Amazon Linux 2 (their customized version of RHEL 7) and Rust 1.67.1
I’m using the exact code from FirstGameFlappyAscii/hello_bterm. If I compile and run that as-is, it blows up because I don’t have Wayland/X11/etc. on this box:
Running `target/debug/flappy`
thread 'main' panicked at 'Failed to initialize any backend! Wayland status: NoCompositorListening X11 status: XOpenDisplayFailed', /home/bjn/.cargo/registry/src/github.com-1ecc6299db9ec823/winit-0.27.5/src/platform_impl/linux/mod.rs:719:9
The GitHub - amethyst/bracket-lib: The Roguelike Toolkit (RLTK), implemented for Rust. section on “Feature flags” says to disable default features and enable a different back-end. So first I tried this:
$ grep feature Cargo.toml
bracket-lib = { version = "~0.8.1", default-features = false, features = ["crossterm"] }
…but that failed with this:
Running `target/debug/flappy`
thread 'main' panicked at 'index out of bounds: the len is 5628 but the index is 6566', /home/bjn/.cargo/registry/src/github.com-1ecc6299db9ec823/bracket-terminal-0.8.7/src/hal/crossterm_be/main_loop.rs:229:25
And then I tried this:
$ grep feature Cargo.toml
bracket-lib = { version = "~0.8.1", default-features = false, features = ["curses"] }
…but that failed with this:
Compiling bracket-terminal v0.8.7
error[E0609]: no field `fitscreen` on type `curses::InitHints`
--> /home/bjn/.cargo/registry/src/github.com-1ecc6299db9ec823/bracket-terminal-0.8.7/src/initializer.rs:455:29
|
455 | self.platform_hints.fitscreen = fitscreen;
| ^^^^^^^^^ help: a field with a similar name exists: `fullscreen`
Help? Thanks! Brent
Popular Pragprog topics

Title: Intuitive Python: docker run… denied error (page 2)
Attempted to run the docker command in both CLI and Powershell
PS C:\Users\r...
New

Running mix deps.get in the sensor_hub directory fails with the following error:
** (Mix) No SSH public keys found in ~/.ssh. An ssh aut...
New

In general, the book isn’t yet updated for Phoenix version 1.6. On page 18 of the book, the authors indicate that an auto generated of ro...
New

When trying to run tox in parallel as explained on page 151, I got the following error:
tox: error: argument -p/–parallel: expected one...
New

When running tox for the first time, I got the following error:
ERROR: InterpreterNotFound: python3.10
I realised that I was running ...
New

Hey there,
I’m enjoying this book and have learned a few things alredayd. However, in Chapter 4 I believe we are meant to see the “>...
New

The markup used to display the uploaded image results in a Phoenix.LiveView.HTMLTokenizer.ParseError error.
lib/pento_web/live/product_l...
New

It seems the second code snippet is missing the code to set the current_user:
current_user: Accounts.get_user_by_session_token(session[&...
New

@parrt
In the context of Chapter 4.3, the grammar Java.g4, meant to parse Java 6 compilation units, no longer passes ANTLR (currently 4....
New

I got this error when executing the plot files on macOS Ventura 13.0.1 with Python 3.10.8 and matplotlib 3.6.1:
programming_ML/code/03_...
New
Other popular topics

I am thinking in building or buy a desktop computer for programing, both professionally and on my free time, and my choice of OS is Linux...
New

Bought the Moonlander mechanical keyboard. Cherry Brown MX switches. Arms and wrists have been hurting enough that it’s time I did someth...
New

Curious to know which languages and frameworks you’re all thinking about learning next :upside_down_face:
Perhaps if there’s enough peop...
New

Inspired by this post from @Carter, which languages, frameworks or other tech or tools do you think is killing it right now? :upside_down...
New

I have seen the keycaps I want - they are due for a group-buy this week but won’t be delivered until October next year!!! :rofl:
The Ser...
New

Build efficient applications that exploit the unique benefits of a pure functional language, learning from an engineer who uses Haskell t...
New

Author Spotlight: VM Brasseur (@vmbrasseur)
We have a treat for you today! We turn the spotlight onto Open Source as we sit down with...
New

Author Spotlight: Karl Stolley (@karlstolley)
Logic! Rhetoric! Prag! Wow, what a combination. In this spotlight, we sit down with Kar...
New

Chris Seaton, the creator of TruffleRuby has died. It appears from suicide :cry:
He left this note on Twitter on the weekend:
And one...
New

zig/http.zig at 7cf2cbb33ef34c1d211135f56d30fe23b6cacd42 · ziglang/zig.
General-purpose programming language and toolchain for maintaini...
New
Latest in Pragprog
Latest (all)
Categories:
My Saved Portals
-
None saved yet
Popular Portals
- /elixir
- /opensuse
- /rust
- /kotlin
- /ruby
- /erlang
- /python
- /clojure
- /react
- /quarkus
- /go
- /vapor
- /v
- /react-native
- /wasm
- /security
- /django
- /nodejs
- /centos
- /haskell
- /rails
- /fable
- /gleam
- /swift
- /js
- /deno
- /assemblyscript
- /tailwind
- /laravel
- /symfony
- /phoenix
- /crystal
- /typescript
- /debian
- /adonisjs
- /julia
- /arch-linux
- /svelte
- /spring
- /c-plus-plus
- /preact
- /flutter
- /actix
- /java
- /angular
- /ocaml
- /zig
- /kubuntu
- /scala
- /zotonic
- /vim
- /rocky
- /lisp
- /html
- /keyboards
- /vuejs
- /nim
- /emacs
- /nerves
- /elm