6P by xguru 2020-06-26 | favorite | 댓글과 토론

- JavaScript / TypeScript 에 익숙한 개발자를 위해 유닉스 wc 명령어를 Rust로 만들어가면서 설명하는 가이드
- 특정 함수/개념들을 비슷한 문법들을 들어 비교하면서 설명
생성 : cargo new miniwc --bin
→ cargo ≒ npm
ㅤ→ cargo.toml ≒ package.json
ㅤ→ cargo.lock ≒ package-lock.json
→ cargo run start ≒ npm run start
→ struct ≒ Object
→ std::env::args() ≒ process.argv
→ std::fs::read_to_string ≒ fs.readFile
→ split_whitespace() ≒ split()