Skip to content

Commit 39bb370

Browse files
authored
Merge pull request #8 from mirrorstack-ai/feat/rust-rewrite
chore!: rewrite mirrorstack-cli in Rust (login + whoami)
2 parents 1e06321 + f14e2ea commit 39bb370

23 files changed

Lines changed: 3135 additions & 476 deletions

File tree

.env.example

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Copy this file to `.env` for local development.
2+
# Process env vars override .env if both are set.
3+
4+
MIRRORSTACK_API_URL=http://localhost:8081
5+
MIRRORSTACK_WEB_URL=http://localhost:3000

.github/workflows/ci.yml

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
env:
10+
CARGO_TERM_COLOR: always
11+
CARGO_INCREMENTAL: "0"
12+
RUSTFLAGS: "-D warnings"
13+
14+
jobs:
15+
lint:
16+
name: Lint (fmt + clippy)
17+
runs-on: ubuntu-latest
18+
steps:
19+
- uses: actions/checkout@v4
20+
21+
- name: Install Rust toolchain
22+
run: rustup update stable && rustup default stable && rustup component add rustfmt clippy
23+
24+
- uses: Swatinem/rust-cache@v2
25+
26+
- name: rustfmt
27+
run: cargo fmt --all -- --check
28+
29+
- name: clippy
30+
run: cargo clippy --all-targets --all-features
31+
32+
test:
33+
name: Test
34+
runs-on: ubuntu-latest
35+
steps:
36+
- uses: actions/checkout@v4
37+
38+
- name: Install Rust toolchain
39+
run: rustup update stable && rustup default stable
40+
41+
- uses: Swatinem/rust-cache@v2
42+
43+
- name: cargo test
44+
run: cargo test --all-features --no-fail-fast
45+
46+
build:
47+
name: Build (${{ matrix.os }})
48+
runs-on: ${{ matrix.os }}
49+
strategy:
50+
fail-fast: false
51+
matrix:
52+
os: [ubuntu-latest, macos-latest, windows-latest]
53+
steps:
54+
- uses: actions/checkout@v4
55+
56+
- name: Install Rust toolchain
57+
run: rustup update stable && rustup default stable
58+
59+
- uses: Swatinem/rust-cache@v2
60+
61+
- name: cargo build --release
62+
run: cargo build --release --locked

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
.DS_Store
2-
mirrorstack-cli
2+
/target
33
dist/
4+
.env

0 commit comments

Comments
 (0)