Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Dec 25, 2024. It is now read-only.
/ncurses-rsPublic archive

A low-level ncurses wrapper for Rust

License

NotificationsYou must be signed in to change notification settings

jeaye/ncurses-rs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Important

ncurses-rs has been archived and will not be further developed. Release 6.0.1 is the last release.

Overall, the thinness of this wrapper puts it into an uncomfortable middle ground between C and Rust which is still unsafe and not very Rustic. It'd be better to use either C interop directly or something altogether safer. I made ncurses-rs in 2015, when the Rust landscape wasvery different.

If you'd like to make a TUI in safe Rust, considerratatui,cursive, or similar.

This is avery thin wrapper around the ncurses TUI lib.

Building

The compiled library will go to thetarget directory.

cargo build

Note that you must to have the ncurses library installed and linkable for ncurses-rs to work. On Linux, this should be trivial. On OS X, consider installing ncurses using Homebrew. (Note that you have to force Homebrew to link the library to/usr/local/lib:brew link --force ncurses and set that path toLIBRARY_PATH environmental variable.)

Examples

Examples are built bycargo build. To run them, usecargo run --example ex_<NUMBER>. Example numbers increase along with the complexity of the example.

Current examples:
1.Hello World
2.Basic Input & Attributes
3.Simple Pager
4.Window Movement
5.Menu Library (requires rust nightly)
6.Pager & Syntax Highlighting
7.Basic Input & Attributes (Unicode)
8.Special ACS Characters

Environment variables

Some environment variables are read bybuild.rs:

If set,NCURSES_RS_RUSTC_LINK_LIB will be used forNCURSES_RS_RUSTC_LINK_LIB.

If set,NCURSES_RS_RUSTC_FLAGS will be used forcargo:rustc-flags.

If set,NCURSES_RS_CFLAGS will be used for the compilation of the test programchtype_size.c.

About

A low-level ncurses wrapper for Rust

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors64

Languages


[8]ページ先頭

©2009-2025 Movatter.jp