From ba660aa69b748b9f342e260896d1fe107005a49d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?joseLu=C3=ADs?= Date: Mon, 10 Aug 2020 23:56:06 +0200 Subject: [PATCH] make rust bindings no_std compatible, fixes #872 --- rust/libnotcurses-sys/Cargo.toml | 5 ++--- rust/libnotcurses-sys/src/key.rs | 5 ++--- rust/libnotcurses-sys/src/nc.rs | 2 -- rust/libnotcurses-sys/src/pixel.rs | 2 -- 4 files changed, 4 insertions(+), 10 deletions(-) diff --git a/rust/libnotcurses-sys/Cargo.toml b/rust/libnotcurses-sys/Cargo.toml index 7164a5822..58bb2c7be 100644 --- a/rust/libnotcurses-sys/Cargo.toml +++ b/rust/libnotcurses-sys/Cargo.toml @@ -21,9 +21,8 @@ keywords = ["tui", "cli", "terminal", "ncurses", "ffi"] [dependencies] libc = {version = "0.2.74", default-features = false} cty = "0.2.1" -# blocked by: https://github.com/Amanieu/cstr_core/issues/4 -# cstr_core = "0.2" -cstr_core = {path = "../../../../_temp_clones/cstr_core"} +# cstr_core = "0.2" # waiting for the next version after 0.2.0 +cstr_core = {git= "https://github.com/Amanieu/cstr_core"} libc-print = "0.1.13" [build-dependencies] diff --git a/rust/libnotcurses-sys/src/key.rs b/rust/libnotcurses-sys/src/key.rs index e4ec969dc..a64a2f066 100644 --- a/rust/libnotcurses-sys/src/key.rs +++ b/rust/libnotcurses-sys/src/key.rs @@ -11,13 +11,12 @@ // -------------- // nckey_mouse_p // nckey_supppuab_p -// -// use std::ffi::CString; -// + // use crate as ffi; // use crate::types::{ChannelPair, IntResult}; + // // Is this char32_t a Supplementary Private Use Area-B codepoint? // static inline bool // nckey_supppuab_p(char32_t w){ diff --git a/rust/libnotcurses-sys/src/nc.rs b/rust/libnotcurses-sys/src/nc.rs index 298036925..518f893d1 100644 --- a/rust/libnotcurses-sys/src/nc.rs +++ b/rust/libnotcurses-sys/src/nc.rs @@ -51,8 +51,6 @@ // notcurses_term_dim_yx -// use std::ffi::CString; -// // use crate as ffi; // use crate::types::{ChannelPair, IntResult}; diff --git a/rust/libnotcurses-sys/src/pixel.rs b/rust/libnotcurses-sys/src/pixel.rs index 8b85b8c72..86c6038fe 100644 --- a/rust/libnotcurses-sys/src/pixel.rs +++ b/rust/libnotcurses-sys/src/pixel.rs @@ -22,8 +22,6 @@ // ncpixel_set_rgb -// use std::ffi::CString; -// // use crate as ffi; // use crate::types::{ChannelPair, IntResult};