레이블이 bat인 게시물을 표시합니다. 모든 게시물 표시
레이블이 bat인 게시물을 표시합니다. 모든 게시물 표시

rust unstable library error

# wsl 환경에서 cargo 로 bat 설치(빌드)시 
cargo install bat

# 다음과 같은 에러가 발생한다.
error[E0658]: use of unstable library feature 'is_terminal'
/home/ysoftman/.cargo/registry/src/github.com-1ecc6299db9ec823/grep-cli-0.1.8/src/lib.rs:238:23
std::io::stderr().is_terminal()

# rust 버전은 다음과 같다.
rustc --version
rustc 1.66.1 (90743e729 2023-01-10) (built from a source tarball)

# 메시지의 링크를 보면 이슈가 있다.

# unstable 상태가 에러가 아니라면 계속 진행하는 옵션을 줘도 실패한다.
cargo install -Z unstable-option --keep-going bat

# mac 에선 cargo 로 bat 설치시 똑같은 grep-cli v0.1.8 버전을 사용해 빌드하는데 잘된다.
# mac 에 설치된 grep-cli library 버전
cargo search grep-cli
grep-cli = "0.1.8"    # Utilities for search oriented command line applications.

# rustup 을 설치해서 rustc/cargo 버전을 올려보자.
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

# cargo 가 제대로 동작하지 않는다면 다음과 같이 삭제 후 재설치한다.
rustup uninstall stable && rustup install stable

# 최신 버전 확인
cargo --version
cargo 1.71.0 (cfd3bbd8f 2023-06-08)

# 이제 빌드 에러 없이 설치된다.
cargo install bat

rust cli tools

# xNix 전통 command 를 대체하는 rust 로 만든 command tools
time(벤치마크) - hyperfine(https://github.com/sharkdp/hyperfine)

# 그 밖에 유용한 툴
터미널 에뮬레이터 alacritty(https://github.com/alacritty/alacritty)
정규표현식 생성기 grex(https://github.com/pemistahl/grex)
코드 통계 보기 tokei(https://github.com/XAMPPRocky/tokei)
git diff 툴 git-delta(https://github.com/dandavison/delta)

# golang 경쟁? 툴

스크립트로 매트릭스(Matrix) 화면 만들기

콘솔 창에서 매트릭스 화면을 위해 스크립트를 작성해 보자.

[윈도우 .bat]
@rem ysoftman
@rem cmd 창에서 매트릭스효과 내기

@echo off
color 0a
mode 1000

:matrix
echo %random%%random%%random%%random%%random%%random%%random%%random%%random%%random%%random%%random%%random%%random%%random%%random%%random%%random%%random%%random%%random%%random%%random%%random%%random%%random%%random%%random%%random%%random%%random%%random%%random%%random%%random%%random%%random%%random%%random%%random%%random%%random%%random%%random%%random%%random%%random%%random%%random%%random%%random%%random%%random%%random%%random%%random%%random%%random%

goto matrix

[리눅스]
shell script

[맥]
http://www.asty.org/cmatrix/
brew install cmatrix