Rust-DAY1

2020-01-08

sun

sun
- ๊ฐ„๋‹จํ•œ ํ”„๋กœ๊ทธ๋žจ์„ ๋ฐฐ์šฐ๋ฉด์„œ Rust ๋ฅผ ๋ฐฐ์›Œ์„œ ๋‚จ์ฃผ์ž!
- multiple hostย  ์— shell ๋ช…๋ น์–ด๋ฅผ ๋ณด๋‚ด๊ณ  ๊ทธ๊ฒƒ์„ ๋ณด์—ฌ์ฃผ๋Š” ๋‹จ์ˆœํ•œ CLI ํ”„๋กœ๊ทธ๋žจ(์‚ฌ์‹ค python ansible ์กฐํ•ฉ์ด๋ฉด ๊ธˆ๋ฐฉ ๋ ๊ฒƒ ๊ฐ™์ง€๋งŒ...)
- github action ์— CI ๊ด€๋ จ ์ŠคํŠธ๋ฆฝํŠธ ์ •์˜ํ•˜๊ณ  ์‹œ์ž‘!

    name: CI

    on: [push]

    jobs:
      build:

        runs-on: ubuntu-latest

        steps:
        - uses: actions/checkout@v1
        - name: Build
          run: cargo build --verbose
        - name: Run tests
          run: cargo test --verbose
        - name: Check Lint
          run: cargo fmt --all -- --check --verbose

๊ฐœ๋ฐœ ํ™˜๊ฒฝ ๊ตฌ์„ฑํ•˜๊ธฐ

clap

    [dependencies]
    clap = "~2.33.0"

Custom Type ์ •์˜ํ•˜๊ธฐ

    type HostFilePath = String;
    type Input = String;

Reference

** ์•„์ง ๋ชจ๋ฅด๋Š”๊ฒƒ :**

#rust  #100DaysOfRust