Rust implementation of the termbox library

Related tags

Command-line rustbox
Overview

Rustbox

Rustbox is a Rust implementation of termbox.

Currently, this is just a wrapper of the C library by nsf, though my plan is to convert it to be a pure Rust implementation and remove the requirement on the C library.

The original implementation of this was inspired by Aaron Pribadi, so big props to him for the original work.

NOTE This is under development, and the APIs may change as I figure out more how Rust works and as the language itself changes

Documentation

Usage

In your Cargo.toml add the following:

[dependencies]
rustbox = "*"

You can also use the current git version by instead adding:

[dependencies.rustbox]
git = "https://github.com/gchp/rustbox.git"

Then, in your src/example.rs:

extern crate rustbox;

use std::error::Error;
use std::default::Default;

use rustbox::{Color, RustBox};
use rustbox::Key;

fn main() {
    let rustbox = match RustBox::init(Default::default()) {
        Result::Ok(v) => v,
        Result::Err(e) => panic!("{}", e),
    };

    rustbox.print(1, 1, rustbox::RB_BOLD, Color::White, Color::Black, "Hello, world!");
    rustbox.print(1, 3, rustbox::RB_BOLD, Color::White, Color::Black,
                  "Press 'q' to quit.");
    rustbox.present();
    loop {
        match rustbox.poll_event(false) {
            Ok(rustbox::Event::KeyEvent(key)) => {
                match key {
                    Key::Char('q') => { break; }
                    _ => { }
                }
            },
            Err(e) => panic!("{}", e.description()),
            _ => { }
        }
    }
}

NOTE: this example can also be run with cargo run --example hello-world.

Projects that use this crate:

Comments
  • mark `RustBox` `Send`, but still not `Sync`

    mark `RustBox` `Send`, but still not `Sync`

    I propose another solution for #41 along #44.

    The RustBox type is not thread safe, in the sense that multiple threads may never alter the mutable state of a shared RustBox at the same time, so it should not be marked Sync. However, a RustBox type can safely be sent between threads so it should be marked Send.

    This patch makes it possible to wrap a RustBox struct inside a Mutex type, so that it can still be used when the programmer decides to do the synchronization theirself.

    opened by dsprenkels 11
  • Using InputMode::Mouse triggers termbox assertion

    Using InputMode::Mouse triggers termbox assertion

    Using termbox.set_input_mode(InputMode::Mouse) and poll_event(…) triggers an assertion in termbox. It doesn't seem to trigger imediately after a poll but when deinitializing rust-/termbox.

    Here's a minimal example:

    extern crate rustbox;
    
    fn main() {
        let rustbox = rustbox::RustBox::init(Default::default()).unwrap();
        rustbox.set_input_mode(rustbox::InputMode::Mouse);
        rustbox.poll_event(true);
    }
    

    What's weird, though, is that the equivalent C program does not trigger the assertion:

    #include "termbox.h"
    
    int main(int argc, char **argv) {
        tb_init();
        tb_select_input_mode(TB_INPUT_MOUSE);
    
        struct tb_event ev;
        tb_poll_event(&ev);
    
        tb_shutdown();
        return 0;
    }
    
    opened by panicbit 11
  • Build errors on latest rust nightly

    Build errors on latest rust nightly

       Compiling rustbox v0.2.9
    /Users/sameerdhar/.cargo/registry/src/github.com-1ecc6299db9ec823/rustbox-0.2.9/src/rustbox.rs:122:32: 122:37 error: explicit lifetime bound required
    /Users/sameerdhar/.cargo/registry/src/github.com-1ecc6299db9ec823/rustbox-0.2.9/src/rustbox.rs:122     Opt(InitOption, Option<Box<Error>>),
                                                                                                                                      ^~~~~
    error: aborting due to previous error
    Could not compile `rustbox`.
    
    $[~] rustc --version                            
    rustc 1.0.0-nightly (29bd9a06e 2015-01-20 23:03:09 +0000)
    
    bug 
    opened by cevn 9
  • Thread safety

    Thread safety

    As mentioned here, Termbox is partially thread safe. This PR synchronizes access to Termbox's input/output streams so that it can be shared safely across threads.

    The primary use case for this is for applications with a thread that blocks on input, with another thread that renders output to the screen.

    opened by jmacdonald 7
  • Can't control cursor

    Can't control cursor

    This is a bit of an odd issue. I cannot control the appearance of the cursor on only one my computers, running OSX Mavericks. On the other one, with Yosemite, I can use rustbox.set_cursor() to control its position, but it has no effect on this one.

    I'll attach a picture of what it looks like and what it should look like. Here the cursor is following the input for some reason.

    screen shot 2015-02-01 at 7 48 55 pm

    Here it seems to work as expected. There is no difference in code on the two boxes. screen shot 2015-02-01 at 7 51 00 pm

    opened by cevn 7
  • Thread safety

    Thread safety

    Hi,

    I've been experimenting with rustbox and wanted to use it to across threads.

    According to this commit it looks like I can: https://github.com/gchp/rustbox/pull/8

    But then I get this error when I try to use it in a thread:

    the trait `core::marker::Send` is not implemented for the type `*mut ()`
    

    Which I think is coming from here:

    https://github.com/gchp/rustbox/blob/7e76a04e7c78a96e00b0435ef5065ce2381c7492/src/rustbox.rs#L221

    Which indicated that termbox isn't thread safe.

    Can rustbox be used in threads?

    If so, any tips on how? I've tried wrapping it in Arc::new(Mutex::new(Rustbox::init()) but without luck.

    Cheers

    opened by sebglazebrook 6
  • Can't compile with rustc beta 1.1

    Can't compile with rustc beta 1.1

    Exact version: rustc 1.1.0-beta (cd7d89af9 2015-05-16) (built 2015-05-16)

       Compiling rustbox v0.6.1
    /Users/benekastah/.cargo/registry/src/github.com-1ecc6299db9ec823/rustbox-0.6.1/src/rustbox.rs:1:1: 1:18 error: unstable feature
    /Users/benekastah/.cargo/registry/src/github.com-1ecc6299db9ec823/rustbox-0.6.1/src/rustbox.rs:1 #![feature(libc)]
                                                                                                     ^~~~~~~~~~~~~~~~~
    note: this feature may not be used in the beta release channel
    /Users/benekastah/.cargo/registry/src/github.com-1ecc6299db9ec823/rustbox-0.6.1/src/rustbox.rs:2:1: 2:34 error: unstable feature
    /Users/benekastah/.cargo/registry/src/github.com-1ecc6299db9ec823/rustbox-0.6.1/src/rustbox.rs:2 #![feature(optin_builtin_traits)]
                                                                                                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    note: this feature may not be used in the beta release channel
    error: aborting due to 2 previous errors
    Could not compile `rustbox`.
    

    I also can't compile with the rustc 1.0 since tempfile (a dependency of a dependency I guess) won't compile on that version.

    opened by benekastah 6
  • Add thread safety around RustBox.

    Add thread safety around RustBox.

    The effects are twofold:

    1. Remove the !Send PhantomData element from RustBox, allowing a RustBox container to be shared between threads.
    2. Require mutable references in all places where the underlying termbox state will be changed. This requires all shared RustBox instances to be wrapped in an Arc<Mutex<>>.

    Additionally, a "thread-safety" example was added.

    opened by Schoonology 5
  • Use a structure for initialization options

    Use a structure for initialization options

    This commit also changes the error type returned from RustBox::init to match the new options structure and replaces the boxed Error with an IoError (because this is the only error that can occur).

    Using structures for initialization options is more idiomatic (this is what rustc tends to do). Unfortunately, I had to make several unrelated changes in this commit to get a reasonable error type. I can split this into multiple commits but I'd rather not go though the hassle.

    opened by Stebalien 5
  • Add suspend support

    Add suspend support

    This PR is based on the changes in #81.

    In a threaded application, temporarily tearing down a Rustbox instance (to suspend the application) can be problematic. This adds a suspend method that locks access to a Rustbox instance across all threads, shuts down Termbox, and defers to the caller before re-initializing Termbox and releasing all locks.

    opened by jmacdonald 4
  • Unable to compile example on Mac OSX

    Unable to compile example on Mac OSX

    /Users/gabriel/.cargo/registry/src/github.com-1ecc6299db9ec823/tempfile-0.4.0/src/imp/unix.rs:45:17:     45:21 error: unresolved name `path`. Did you mean `dir`?
    /Users/gabriel/.cargo/registry/src/github.com-1ecc6299db9ec823/tempfile-0.4.0/src/imp/unix.rs:45          create_unix(path)
                                                                                                                 ^~~~
    error: aborting due to previous error
    Build failed, waiting for other jobs to finish...
    Could not compile `tempfile`.
    

    I'm not actually aware if this is supposed to work right now or not. This error was generated with:

    cargo run --example hello-world
    
    opened by nihakue 4
  • Update termbox-sys version

    Update termbox-sys version

    Thanks for this awesome project! This PR upgrades the termbox-sys version to resolve some build issues related to https://github.com/gchp/termbox-sys/pull/20. I'm stuck on that problem too.

    I'd be happy if you could merge this change and release a new version!

    opened by moricho 0
  • Linking error when cross compiling

    Linking error when cross compiling

    I want to compile my project using Rustbox for the Raspberry Pi (arm).

    export CARGO_TARGET_ARMV7_UNKNOWN_LINUX_GNUEABIHF_LINKER=../../tools/arm-bcm2708/arm-linux-gnueabihf/bin/arm-linux-gnueabihf-gcc
    cargo build --target=armv7-unknown-linux-gnueabihf --verbose
    

    When I do this, I get the following error:

    error: linking with `${crossgcc}/tools/arm-bcm2708/arm-linux-gnueabihf/bin/arm-linux-gnueabihf-gcc` failed: exit code: 1
      |
      = note: "${crossgcc}/tools/arm-bcm2708/arm-linux-gnueabihf/bin/arm-linux-gnueabihf-gcc" "-Wl,--as-needed" "-Wl,-z,noexecstack" "-L" "~/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/armv7-unknown-linux-gnueabihf/lib" "${projectdir}/target/armv7-unknown-linux-gnueabihf/debug/deps/raspi_midi-bc8787688de306da.1008l0s9nl4wm7th.rcgu.o" "${projectdir}/target/armv7-unknown-linux-gnueabihf/debug/deps/raspi_midi-bc8787688de306da.12k7pgxoiobo1iii.rcgu.o" "${projectdir}/target/armv7-unknown-linux-gnueabihf/debug/deps/raspi_midi-bc8787688de306da.19cqvc3dzrmeckjk.rcgu.o" "${projectdir}/target/armv7-unknown-linux-gnueabihf/debug/deps/raspi_midi-bc8787688de306da.1dvzg9oh1jegxabd.rcgu.o" "${projectdir}/target/armv7-unknown-linux-gnueabihf/debug/deps/raspi_midi-bc8787688de306da.1edz53dex3gqajxq.rcgu.o" "${projectdir}/target/armv7-unknown-linux-gnueabihf/debug/deps/raspi_midi-bc8787688de306da.1g2gfhp3sc5kx4s9.rcgu.o" "${projectdir}/target/armv7-unknown-linux-gnueabihf/debug/deps/raspi_midi-bc8787688de306da.1jymavqstc8ihg0r.rcgu.o" "${projectdir}/target/armv7-unknown-linux-gnueabihf/debug/deps/raspi_midi-bc8787688de306da.1kqd8dllyvsjajo9.rcgu.o" "${projectdir}/target/armv7-unknown-linux-gnueabihf/debug/deps/raspi_midi-bc8787688de306da.1ly4emdjih3g0vy6.rcgu.o" "${projectdir}/target/armv7-unknown-linux-gnueabihf/debug/deps/raspi_midi-bc8787688de306da.1ounnrf447udb9t1.rcgu.o" "${projectdir}/target/armv7-unknown-linux-gnueabihf/debug/deps/raspi_midi-bc8787688de306da.1rs7hfaj69qi537r.rcgu.o" "${projectdir}/target/armv7-unknown-linux-gnueabihf/debug/deps/raspi_midi-bc8787688de306da.1rxdrl96skzy32ec.rcgu.o" "${projectdir}/target/armv7-unknown-linux-gnueabihf/debug/deps/raspi_midi-bc8787688de306da.1svomfg85dl7lb45.rcgu.o" "${projectdir}/target/armv7-unknown-linux-gnueabihf/debug/deps/raspi_midi-bc8787688de306da.1xeve1e3ohjytfia.rcgu.o" "${projectdir}/target/armv7-unknown-linux-gnueabihf/debug/deps/raspi_midi-bc8787688de306da.1yb8gfnya8mf08bc.rcgu.o" "${projectdir}/target/armv7-unknown-linux-gnueabihf/debug/deps/raspi_midi-bc8787688de306da.215bizr89anbmt56.rcgu.o" "${projectdir}/target/armv7-unknown-linux-gnueabihf/debug/deps/raspi_midi-bc8787688de306da.257zdolv8vxwuops.rcgu.o" "${projectdir}/target/armv7-unknown-linux-gnueabihf/debug/deps/raspi_midi-bc8787688de306da.2847d2cvyhjpm0ys.rcgu.o" "${projectdir}/target/armv7-unknown-linux-gnueabihf/debug/deps/raspi_midi-bc8787688de306da.2ba94v7nc96unz5v.rcgu.o" "${projectdir}/target/armv7-unknown-linux-gnueabihf/debug/deps/raspi_midi-bc8787688de306da.2izhkh3ouaj1c6gb.rcgu.o" "${projectdir}/target/armv7-unknown-linux-gnueabihf/debug/deps/raspi_midi-bc8787688de306da.2lpc7b4gprr5wsz8.rcgu.o" "${projectdir}/target/armv7-unknown-linux-gnueabihf/debug/deps/raspi_midi-bc8787688de306da.2mbpcea8v4ff0pmr.rcgu.o" "${projectdir}/target/armv7-unknown-linux-gnueabihf/debug/deps/raspi_midi-bc8787688de306da.2omhgqc9ig09t6zw.rcgu.o" "${projectdir}/target/armv7-unknown-linux-gnueabihf/debug/deps/raspi_midi-bc8787688de306da.2p3ixo1str5754ti.rcgu.o" "${projectdir}/target/armv7-unknown-linux-gnueabihf/debug/deps/raspi_midi-bc8787688de306da.2p7dkr4hm0qbrue9.rcgu.o" "${projectdir}/target/armv7-unknown-linux-gnueabihf/debug/deps/raspi_midi-bc8787688de306da.2rsg1snl3how4y34.rcgu.o" "${projectdir}/target/armv7-unknown-linux-gnueabihf/debug/deps/raspi_midi-bc8787688de306da.2t6q7k3mhmxfllso.rcgu.o" "${projectdir}/target/armv7-unknown-linux-gnueabihf/debug/deps/raspi_midi-bc8787688de306da.2ta8er23rs3dk4mq.rcgu.o" "${projectdir}/target/armv7-unknown-linux-gnueabihf/debug/deps/raspi_midi-bc8787688de306da.2txz1tmhx061upc8.rcgu.o" "${projectdir}/target/armv7-unknown-linux-gnueabihf/debug/deps/raspi_midi-bc8787688de306da.2u0p2e5a7vap77d0.rcgu.o" "${projectdir}/target/armv7-unknown-linux-gnueabihf/debug/deps/raspi_midi-bc8787688de306da.2vf7v8d5y0enpi4n.rcgu.o" "${projectdir}/target/armv7-unknown-linux-gnueabihf/debug/deps/raspi_midi-bc8787688de306da.2vwbsa7se25khwuc.rcgu.o" "${projectdir}/target/armv7-unknown-linux-gnueabihf/debug/deps/raspi_midi-bc8787688de306da.2w1bdfkth1a1g5x0.rcgu.o" "${projectdir}/target/armv7-unknown-linux-gnueabihf/debug/deps/raspi_midi-bc8787688de306da.32jcekf5j4rzdnf2.rcgu.o" "${projectdir}/target/armv7-unknown-linux-gnueabihf/debug/deps/raspi_midi-bc8787688de306da.35ci1gqv93xhms71.rcgu.o" "${projectdir}/target/armv7-unknown-linux-gnueabihf/debug/deps/raspi_midi-bc8787688de306da.39z6eogf3avg7tyh.rcgu.o" "${projectdir}/target/armv7-unknown-linux-gnueabihf/debug/deps/raspi_midi-bc8787688de306da.3aqlvpepwgxwohh5.rcgu.o" "${projectdir}/target/armv7-unknown-linux-gnueabihf/debug/deps/raspi_midi-bc8787688de306da.3dmdcpwnx9bb4ej0.rcgu.o" "${projectdir}/target/armv7-unknown-linux-gnueabihf/debug/deps/raspi_midi-bc8787688de306da.3i3rczevmdtsrojh.rcgu.o" "${projectdir}/target/armv7-unknown-linux-gnueabihf/debug/deps/raspi_midi-bc8787688de306da.3lg46efxlfmva0mp.rcgu.o" "${projectdir}/target/armv7-unknown-linux-gnueabihf/debug/deps/raspi_midi-bc8787688de306da.3o9xq77onssjtr0l.rcgu.o" "${projectdir}/target/armv7-unknown-linux-gnueabihf/debug/deps/raspi_midi-bc8787688de306da.3q8msmkkn3jnw688.rcgu.o" "${projectdir}/target/armv7-unknown-linux-gnueabihf/debug/deps/raspi_midi-bc8787688de306da.3r1kz7ohfkigdn08.rcgu.o" "${projectdir}/target/armv7-unknown-linux-gnueabihf/debug/deps/raspi_midi-bc8787688de306da.3sztj1nz2hw55aif.rcgu.o" "${projectdir}/target/armv7-unknown-linux-gnueabihf/debug/deps/raspi_midi-bc8787688de306da.3tau4qsfulrvzljs.rcgu.o" "${projectdir}/target/armv7-unknown-linux-gnueabihf/debug/deps/raspi_midi-bc8787688de306da.3uosxaykpp5evipj.rcgu.o" "${projectdir}/target/armv7-unknown-linux-gnueabihf/debug/deps/raspi_midi-bc8787688de306da.42agq16cf213sc0l.rcgu.o" "${projectdir}/target/armv7-unknown-linux-gnueabihf/debug/deps/raspi_midi-bc8787688de306da.46kkuayemzs9rgmi.rcgu.o" "${projectdir}/target/armv7-unknown-linux-gnueabihf/debug/deps/raspi_midi-bc8787688de306da.48gren5nft6hyn54.rcgu.o" "${projectdir}/target/armv7-unknown-linux-gnueabihf/debug/deps/raspi_midi-bc8787688de306da.4aqpjp2qd7a9ugeg.rcgu.o" "${projectdir}/target/armv7-unknown-linux-gnueabihf/debug/deps/raspi_midi-bc8787688de306da.4ct2q2t1qi4k50lr.rcgu.o" "${projectdir}/target/armv7-unknown-linux-gnueabihf/debug/deps/raspi_midi-bc8787688de306da.4d704zhphd8igsyk.rcgu.o" "${projectdir}/target/armv7-unknown-linux-gnueabihf/debug/deps/raspi_midi-bc8787688de306da.4gk14y7qn2pxlc61.rcgu.o" "${projectdir}/target/armv7-unknown-linux-gnueabihf/debug/deps/raspi_midi-bc8787688de306da.4h5vy7785hzz3xtf.rcgu.o" "${projectdir}/target/armv7-unknown-linux-gnueabihf/debug/deps/raspi_midi-bc8787688de306da.4i5r35mfbeu2ial9.rcgu.o" "${projectdir}/target/armv7-unknown-linux-gnueabihf/debug/deps/raspi_midi-bc8787688de306da.4mynvmntc9bgng23.rcgu.o" "${projectdir}/target/armv7-unknown-linux-gnueabihf/debug/deps/raspi_midi-bc8787688de306da.4qjhjiskf5m2pvry.rcgu.o" "${projectdir}/target/armv7-unknown-linux-gnueabihf/debug/deps/raspi_midi-bc8787688de306da.4rganp8vd3xlo27z.rcgu.o" "${projectdir}/target/armv7-unknown-linux-gnueabihf/debug/deps/raspi_midi-bc8787688de306da.4v3oltt9l1xfnj3o.rcgu.o" "${projectdir}/target/armv7-unknown-linux-gnueabihf/debug/deps/raspi_midi-bc8787688de306da.4wjwckitc9fijiqw.rcgu.o" "${projectdir}/target/armv7-unknown-linux-gnueabihf/debug/deps/raspi_midi-bc8787688de306da.4wv9rdl1zurxq14b.rcgu.o" "${projectdir}/target/armv7-unknown-linux-gnueabihf/debug/deps/raspi_midi-bc8787688de306da.4xly2jo9c8q5akmw.rcgu.o" "${projectdir}/target/armv7-unknown-linux-gnueabihf/debug/deps/raspi_midi-bc8787688de306da.4yaj4y9m26iqub5d.rcgu.o" "${projectdir}/target/armv7-unknown-linux-gnueabihf/debug/deps/raspi_midi-bc8787688de306da.4z5gdwgyzyzsy1i9.rcgu.o" "${projectdir}/target/armv7-unknown-linux-gnueabihf/debug/deps/raspi_midi-bc8787688de306da.536z3tn6hgtlyzxq.rcgu.o" "${projectdir}/target/armv7-unknown-linux-gnueabihf/debug/deps/raspi_midi-bc8787688de306da.574b6yhsdljwfu3x.rcgu.o" "${projectdir}/target/armv7-unknown-linux-gnueabihf/debug/deps/raspi_midi-bc8787688de306da.57zhllmpipv0nlqk.rcgu.o" "${projectdir}/target/armv7-unknown-linux-gnueabihf/debug/deps/raspi_midi-bc8787688de306da.5a4dj8cgzx4wzxt9.rcgu.o" "${projectdir}/target/armv7-unknown-linux-gnueabihf/debug/deps/raspi_midi-bc8787688de306da.5acclkpx9ttwgh21.rcgu.o" "${projectdir}/target/armv7-unknown-linux-gnueabihf/debug/deps/raspi_midi-bc8787688de306da.5d3vl9z2yw5lxrlz.rcgu.o" "${projectdir}/target/armv7-unknown-linux-gnueabihf/debug/deps/raspi_midi-bc8787688de306da.8ypo8iixyaykk49.rcgu.o" "${projectdir}/target/armv7-unknown-linux-gnueabihf/debug/deps/raspi_midi-bc8787688de306da.9vaw0qfox3jry5m.rcgu.o" "${projectdir}/target/armv7-unknown-linux-gnueabihf/debug/deps/raspi_midi-bc8787688de306da.emv05lcv863t0ae.rcgu.o" "${projectdir}/target/armv7-unknown-linux-gnueabihf/debug/deps/raspi_midi-bc8787688de306da.jshjhe5d4jheoy4.rcgu.o" "${projectdir}/target/armv7-unknown-linux-gnueabihf/debug/deps/raspi_midi-bc8787688de306da.ntcy8lpo8qxcr9j.rcgu.o" "${projectdir}/target/armv7-unknown-linux-gnueabihf/debug/deps/raspi_midi-bc8787688de306da.q4brfjcbpwo8iv1.rcgu.o" "${projectdir}/target/armv7-unknown-linux-gnueabihf/debug/deps/raspi_midi-bc8787688de306da.rofvvnesfz6hg21.rcgu.o" "${projectdir}/target/armv7-unknown-linux-gnueabihf/debug/deps/raspi_midi-bc8787688de306da.t0bwea30jgemcjf.rcgu.o" "${projectdir}/target/armv7-unknown-linux-gnueabihf/debug/deps/raspi_midi-bc8787688de306da.t2g1ujgh90zkmpc.rcgu.o" "${projectdir}/target/armv7-unknown-linux-gnueabihf/debug/deps/raspi_midi-bc8787688de306da.up7amjnd935kwn5.rcgu.o" "${projectdir}/target/armv7-unknown-linux-gnueabihf/debug/deps/raspi_midi-bc8787688de306da.uyj9d66axig7jyv.rcgu.o" "${projectdir}/target/armv7-unknown-linux-gnueabihf/debug/deps/raspi_midi-bc8787688de306da.vkzygjqio102jzl.rcgu.o" "${projectdir}/target/armv7-unknown-linux-gnueabihf/debug/deps/raspi_midi-bc8787688de306da.xie7dzd42e97sxt.rcgu.o" "${projectdir}/target/armv7-unknown-linux-gnueabihf/debug/deps/raspi_midi-bc8787688de306da.zh5wbsm4cnebfed.rcgu.o" "-o" "${projectdir}/target/armv7-unknown-linux-gnueabihf/debug/deps/raspi_midi-bc8787688de306da" "${projectdir}/target/armv7-unknown-linux-gnueabihf/debug/deps/raspi_midi-bc8787688de306da.13s8rhl7je04dhdf.rcgu.o" "-Wl,--gc-sections" "-pie" "-Wl,-zrelro" "-Wl,-znow" "-nodefaultlibs" "-L" "${projectdir}/target/armv7-unknown-linux-gnueabihf/debug/deps" "-L" "${projectdir}/target/debug/deps" "-L" "${projectdir}/target/armv7-unknown-linux-gnueabihf/debug/build/termbox-sys-ae593235b9c54fee/out/lib" "-L" "~/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/armv7-unknown-linux-gnueabihf/lib" "-Wl,-Bstatic" "${projectdir}/target/armv7-unknown-linux-gnueabihf/debug/deps/libtui-d1094482cf843bee.rlib" "${projectdir}/target/armv7-unknown-linux-gnueabihf/debug/deps/libitertools-10b7cf24f1b4adea.rlib" "${projectdir}/target/armv7-unknown-linux-gnueabihf/debug/deps/libeither-cdbe8cbd6ccc2258.rlib" "${projectdir}/target/armv7-unknown-linux-gnueabihf/debug/deps/libbitflags-2c7b3e3d10e1e0dd.rlib" "${projectdir}/target/armv7-unknown-linux-gnueabihf/debug/deps/libcassowary-12f30d1587272133.rlib" "${projectdir}/target/armv7-unknown-linux-gnueabihf/debug/deps/libunicode_width-768fcc6a10e1b4fd.rlib" "${projectdir}/target/armv7-unknown-linux-gnueabihf/debug/deps/libunicode_segmentation-0a12d9b320ac8e9a.rlib" "${projectdir}/target/armv7-unknown-linux-gnueabihf/debug/deps/liblog-5d8fea13e8566107.rlib" "${projectdir}/target/armv7-unknown-linux-gnueabihf/debug/deps/libtake_mut-e724a03909f2ee46.rlib" "${projectdir}/target/armv7-unknown-linux-gnueabihf/debug/deps/libtelnet-20e464814e44ab85.rlib" "${projectdir}/target/armv7-unknown-linux-gnueabihf/debug/deps/librustbox-9ede41e94e7b8119.rlib" "${projectdir}/target/armv7-unknown-linux-gnueabihf/debug/deps/libbitflags-6e94fb97404a885e.rlib" "${projectdir}/target/armv7-unknown-linux-gnueabihf/debug/deps/libtermbox_sys-e359ea16b6845dd7.rlib" "${projectdir}/target/armv7-unknown-linux-gnueabihf/debug/deps/libnum_traits-007e9378c9adbeb7.rlib" "${projectdir}/target/armv7-unknown-linux-gnueabihf/debug/deps/libnum_traits-bebf719718549e64.rlib" "${projectdir}/target/armv7-unknown-linux-gnueabihf/debug/deps/libgag-b9aa7658784435fe.rlib" "${projectdir}/target/armv7-unknown-linux-gnueabihf/debug/deps/libtempfile-ffb6a8fc89d37bc1.rlib" "${projectdir}/target/armv7-unknown-linux-gnueabihf/debug/deps/librand-be4d8af7e5be7a08.rlib" "${projectdir}/target/armv7-unknown-linux-gnueabihf/debug/deps/librand_chacha-5ee44d5402b96f96.rlib" "${projectdir}/target/armv7-unknown-linux-gnueabihf/debug/deps/libc2_chacha-6c9603266c1ccdca.rlib" "${projectdir}/target/armv7-unknown-linux-gnueabihf/debug/deps/libppv_lite86-f1ba3aff7c7b0810.rlib" "${projectdir}/target/armv7-unknown-linux-gnueabihf/debug/deps/liblazy_static-a80335916d5ac241.rlib" "${projectdir}/target/armv7-unknown-linux-gnueabihf/debug/deps/librand_core-cc812de9cd5d62d7.rlib" "${projectdir}/target/armv7-unknown-linux-gnueabihf/debug/deps/libgetrandom-c2261ebb9275cc88.rlib" "${projectdir}/target/armv7-unknown-linux-gnueabihf/debug/deps/libremove_dir_all-35bde33bb517195f.rlib" "${projectdir}/target/armv7-unknown-linux-gnueabihf/debug/deps/libcfg_if-3aec7a461cb89471.rlib" "${projectdir}/target/armv7-unknown-linux-gnueabihf/debug/deps/liblibc-91546af03d20f85e.rlib" "-Wl,--start-group" "~/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/armv7-unknown-linux-gnueabihf/lib/libstd-b806fbdf01014e64.rlib" "~/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/armv7-unknown-linux-gnueabihf/lib/libpanic_unwind-765c392663bd34b7.rlib" "~/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/armv7-unknown-linux-gnueabihf/lib/libbacktrace_sys-1059e0ba7f05fd67.rlib" "~/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/armv7-unknown-linux-gnueabihf/lib/librustc_demangle-85b43da92537c77f.rlib" "~/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/armv7-unknown-linux-gnueabihf/lib/libunwind-f8a77019eff82b98.rlib" "~/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/armv7-unknown-linux-gnueabihf/lib/liblibc-1d32a47a0bdcb0a2.rlib" "~/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/armv7-unknown-linux-gnueabihf/lib/liballoc-c47e11e0b4c869e2.rlib" "~/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/armv7-unknown-linux-gnueabihf/lib/librustc_std_workspace_core-5a60e280b382f06e.rlib" "~/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/armv7-unknown-linux-gnueabihf/lib/libcore-8010f7064010be9c.rlib" "-Wl,--end-group" "~/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/armv7-unknown-linux-gnueabihf/lib/libcompiler_builtins-566972fa63f867ee.rlib" "-Wl,-Bdynamic" "-lutil" "-lutil" "-ldl" "-lrt" "-lpthread" "-lgcc_s" "-lc" "-lm" "-lrt" "-lpthread" "-lutil" "-lutil"
      = note: ${projectdir}/target/armv7-unknown-linux-gnueabihf/debug/deps/libtermbox_sys-e359ea16b6845dd7.rlib: error adding symbols: File format not recognized
              collect2: error: ld returned 1 exit status
              
    
    error: aborting due to previous error
    
    error: Could not compile `raspi-midi`.
    
    Caused by:
      process didn't exit successfully: `rustc --edition=2018 --crate-name raspi_midi src/main.rs --color always --crate-type bin --emit=dep-info,link -C debuginfo=2 -C metadata=bc8787688de306da -C extra-filename=-bc8787688de306da --out-dir ${projectdir}/target/armv7-unknown-linux-gnueabihf/debug/deps --target armv7-unknown-linux-gnueabihf -C linker=${crossgcc}/tools/arm-bcm2708/arm-linux-gnueabihf/bin/arm-linux-gnueabihf-gcc -C incremental=${projectdir}/target/armv7-unknown-linux-gnueabihf/debug/incremental -L dependency=${projectdir}/target/armv7-unknown-linux-gnueabihf/debug/deps -L dependency=${projectdir}/target/debug/deps --extern jack=${projectdir}/target/armv7-unknown-linux-gnueabihf/debug/deps/libjack-fe740c1a502d2c76.rlib --extern rustbox=${projectdir}/target/armv7-unknown-linux-gnueabihf/debug/deps/librustbox-9ede41e94e7b8119.rlib --extern take_mut=${projectdir}/target/armv7-unknown-linux-gnueabihf/debug/deps/libtake_mut-e724a03909f2ee46.rlib --extern telnet=${projectdir}/target/armv7-unknown-linux-gnueabihf/debug/deps/libtelnet-20e464814e44ab85.rlib --extern tui=${projectdir}/target/armv7-unknown-linux-gnueabihf/debug/deps/libtui-d1094482cf843bee.rlib -L ${projectdir}/target/armv7-unknown-linux-gnueabihf/debug/build/termbox-sys-ae593235b9c54fee/out/lib` (exit code: 1)
    
    • Compiling locally works fine, both on the Pi and my PC
    • Cross-compiling works fine too as long as I don't use Rustbox
    opened by piegamesde 0
  • Any limitations?

    Any limitations?

    If I wanted to use rustbox as base for a TUI text editor, should I be aware of any limitations? Specifically, when using certain library it's sometimes impossible to parse certain key combinations etc. Example from kakoune: https://github.com/mawww/kakoune/issues/1270 , where <c-h> can't be used because ncurses does not handle it.

    opened by dpc 0
Owner
Greg Chapple
Head of Technology @propylon
Greg Chapple
Rust Imaging Library's Python binding: A performant and high-level image processing library for Python written in Rust

ril-py Rust Imaging Library for Python: Python bindings for ril, a performant and high-level image processing library written in Rust. What's this? Th

Cryptex 13 Dec 6, 2022
This library provides a convenient derive macro for the standard library's std::error::Error trait.

derive(Error) This library provides a convenient derive macro for the standard library's std::error::Error trait. [dependencies] therror = "1.0" Compi

Sebastian Thiel 5 Oct 23, 2023
Readline Implementation in Rust

RustyLine Readline implementation in Rust that is based on Antirez' Linenoise Supported Platforms Unix (tested on FreeBSD, Linux and macOS) Windows cm

Katsu Kawakami 1.1k Dec 29, 2022
A very fast implementation of tldr in Rust

A very fast implementation of tldr in Rust: Simplified, example based and community-driven man pages.

Danilo Bargen 2.9k Dec 31, 2022
A compact implementation of connect four written in rust.

connect-four A compact implementation of connect four written in rust. Run the game At the moment there no pre-built binaries - but you can build it l

Maximilian Schulke 12 Jul 31, 2022
Baby's first Rust CLI project. Basic implementation of grep. Written in about 100 SLOC.

minigrep Coding project from Chapter 12 of the The Rust Programming Language book. Usage Compile and run as so minigrep QUERY FILENAME QUERY being the

Anis 2 Oct 2, 2021
An implementation of Verifiable Delay Functions in Rust

Verifiable Delay Function (VDF) Implementation in Rust What is a VDF? A Verifiable Delay Function (VDF) is a function that requires substantial time t

null 147 Dec 12, 2022
A Decimal Implementation written in pure Rust suitable for financial calculations.

Decimal   A Decimal implementation written in pure Rust suitable for financial calculations that require significant integral and fractional digits wi

Paul Mason 702 Jan 5, 2023
Rust implementation of custom numeric base conversion.

base_custom Use any characters as your own numeric base and convert to and from decimal. This can be taken advantage of in various ways: Mathematics:

Daniel P. Clark 5 Dec 28, 2021
Red-blue graph problem solver - Rust implementation

Red-blue graph problem solver - Rust implementation The problem is the following: In a directed graph, each node is colored either red or blue. Furthe

Thomas Prévost 2 Jan 17, 2022
A better customization password dictionary generator implementation by Rust.

abcdict A better customization password dictionary generator implementation by Rust. Features Cli Faster Customize Rules Build & Installation $> cargo

b23r0 6 Jun 2, 2022
An Rust implementation of the Modified Merkle Patricia Tree described by ETH Yellow Paper

Merkle Patricia Tree的Rust实现 博客文章:https://dere.press/2022/01/24/eth-trie/ 本实现参考下列项目: https://ethereum.github.io/yellowpaper/paper.pdf https://github.co

M4tsuri 3 Dec 13, 2022
Rust implementation of Python command line progress bar tool tqdm.

tqdm Rust implementation of Python command line progress bar tool tqdm. From original documentation: tqdm derives from the Arabic word taqaddum (تقدّم

Yiheng Du 8 Dec 7, 2022
A cross platform, rust implementation for the Tegra X1 bootROM exploit

Switcheroo A CLI and GUI for the RCM BootRom exploit (Fusée Gelée exploit for Nintendo Switch) Only works on unpatched Switches: https://ismyswitchpat

Ethan Budd 35 Nov 5, 2022
An NTP implementation in Rust, supported by Internet Security Research Group's Prossimo project.

NTPD-rs NTPD-rs is an implementation of NTP completely written in Rust, with a focus on exposing a minimal attack surface. The project is currently in

Prossimo (ISRG) 302 Jan 4, 2023
Rust implementation of PowerSession, with new features and enhancements

PowerSession Record a Session in PowerShell. PowerShell version of asciinema based on Windows Pseudo Console(ConPTY) This is a new Rust implemented ve

Watfaq Technologies Pty Ltd 43 Dec 26, 2022
Jump Point Search Implementation for Path Finding, in Rust

jps : Jump Point Search in Rust. Jump Point Search Algorithm Implementation in Rust. Current implementation status JPS Implementation 3D case ✅ Lifeti

null 3 Dec 15, 2022
A Write Ahead Log (WAL) implementation in Rust

Okay WAL A write-ahead log (WAL) implementation for Rust. There's The Great Wall, and then there's this: an okay WAL. This crate exposes a WAL that su

Khonsu Labs 5 Oct 28, 2022
A user-friendly re-implementation of existing hex tools in Rust

Hex A project to create alternate (and more user friendly) versions of existing hex tools. The project can be installed as a extension to the github-c

Sohom Datta 6 Sep 27, 2022