Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
root = true

[Makefile]
indent_style = tab
indent_size = 2
[Justfile]
indent_style = space
indent_size = 4
3 changes: 2 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ jobs:

- name: Install Rust Binaries
run: |
cargo binstall -y --force just
cargo binstall -y --force leptosfmt
cargo binstall -y --force trunk

Expand All @@ -52,4 +53,4 @@ jobs:
sudo apt-get install -y gcc-aarch64-linux-gnu

- name: Build
run: make release TARGET=${{ matrix.target }}
run: just release ${{ matrix.target }}
3 changes: 2 additions & 1 deletion .github/workflows/clippy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,12 @@ jobs:

- name: Install Rust Binaries
run: |
cargo binstall -y --force just
cargo binstall -y --force leptosfmt
cargo binstall -y --force trunk

- name: Release
run: make release
run: just release

- name: Run Clippy
run: cargo clippy --all-targets --all-features -- -D warnings
3 changes: 2 additions & 1 deletion .github/workflows/fmt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,12 @@ jobs:

- name: Install Rust Binaries
run: |
cargo binstall -y --force just
cargo binstall -y --force leptosfmt
cargo binstall -y --force trunk

- name: Release
run: make release
run: just release

- name: Run
run: cargo fmt --all -- --check
8 changes: 5 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,12 @@ jobs:
- name: Install Rust Binaries
run: |
cargo binstall -y --force cargo-edit
cargo binstall -y --force just
cargo binstall -y --force leptosfmt
cargo binstall -y --force trunk

- name: Build (debug)
run: make build
run: just build

- name: publish crate
run: |
Expand Down Expand Up @@ -103,6 +104,7 @@ jobs:
- name: Install Rust Binaries
run: |
cargo binstall -y --force cargo-tag
cargo binstall -y --force just
cargo binstall -y --force leptosfmt
cargo binstall -y --force trunk

Expand All @@ -120,7 +122,7 @@ jobs:
fi

- name: Build binary
run: make release TARGET=${{ matrix.target }}
run: just release ${{ matrix.target }}

- name: Package binary
run: |
Expand Down Expand Up @@ -195,7 +197,7 @@ jobs:
cargo binstall -y --force trunk

- name: Prep Assets and Binary
run: make release
run: just release

- name: Publish crate
run: |
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ jobs:

- name: Install Rust Binaries
run: |
cargo binstall -y --force just
cargo binstall -y --force leptosfmt
cargo binstall -y --force trunk

- name: Run Tests
run: |
TARGET=$(rustc --version --verbose | grep host | cut -d' ' -f2) make test
run: just test
24 changes: 12 additions & 12 deletions Justfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,39 +8,39 @@ default:
just --list

# Build (debug)
build:
make -C ./src/file-explorer-ui dist
make -C ./src/http-server build TARGET={{target}}
build target=target:
just --justfile ./src/file-explorer-ui/Justfile --working-directory ./src/file-explorer-ui dist
just --justfile ./src/http-server/Justfile --working-directory ./src/http-server build {{target}}

# Build (release)
release:
make -C ./src/file-explorer-ui release
make -C ./src/http-server release TARGET={{target}}
release target=target:
just --justfile ./src/file-explorer-ui/Justfile --working-directory ./src/file-explorer-ui release
just --justfile ./src/http-server/Justfile --working-directory ./src/http-server release {{target}}

# Run http-server
run:
make -C ./src/http-server run
just --justfile ./src/http-server/Justfile --working-directory ./src/http-server run

# Build File Explorer UI (release)
ui-build:
make -C ./src/file-explorer-ui release
just --justfile ./src/file-explorer-ui/Justfile --working-directory ./src/file-explorer-ui release

# Run File Explorer UI dev server
ui-dev:
@echo Starting File Explorer UI…
make -C ./src/file-explorer-ui dev
just --justfile ./src/file-explorer-ui/Justfile --working-directory ./src/file-explorer-ui dev

# Format File Explorer UI
ui-fmt:
make -C ./src/file-explorer-ui fmt
just --justfile ./src/file-explorer-ui/Justfile --working-directory ./src/file-explorer-ui fmt

# Build File Explorer UI (release)
ui-release:
make -C ./src/file-explorer-ui release
just --justfile ./src/file-explorer-ui/Justfile --working-directory ./src/file-explorer-ui release

# Run tests
test:
make -C ./test run
just --justfile ./test/Justfile --working-directory ./test run

# Runs the Development-Kit Container
dkc:
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,13 @@
Build release binaries with:

```bash
make release
just release
```

Optionally you can build for other targets by specifying the `TARGET` variable
Optionally you can build for other targets by passing the target triple

```bash
make release TARGET=<target-triple>
just release <target-triple>
```

For example:
Expand All @@ -42,7 +42,7 @@ For example:
# Install aarch64-unknown-linux-gnu target
rustup target install aarch64-unknown-linux-gnu
# Build for aarch64-unknown-linux-gnu target
make release TARGET=aarch64-unknown-linux-gnu
just release aarch64-unknown-linux-gnu
```

Then use the following _alias_ for convenience
Expand Down
23 changes: 23 additions & 0 deletions src/file-explorer-ui/Justfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
set dotenv-load
set positional-arguments

# List Tasks
default:
just --list

# Run dev server
dev:
trunk serve --config ./Trunk.toml

# Build (debug)
dist:
trunk build --config ./Trunk.toml

# Format
fmt:
@leptosfmt --version >/dev/null 2>&1 || (echo "Error: leptosfmt is required."; exit 1)
@leptosfmt ./src/**/*.rs

# Build (release)
release:
trunk build --release --locked --config ./Trunk.toml
17 changes: 0 additions & 17 deletions src/file-explorer-ui/Makefile

This file was deleted.

26 changes: 26 additions & 0 deletions src/http-server/Justfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
set dotenv-load
set positional-arguments

target := `rustc --version --verbose | grep host | cut -d' ' -f2`

# List Tasks
default:
cargo r -- start

# Build (debug)
build target=target:
@echo "Building for target: {{target}}"
cargo b --target {{target}}

# Build (release)
release target=target:
@echo "Building with release mode for target: {{target}}"
cargo b --release --target {{target}}

# Build File Explorer UI (debug)
dist:
just --justfile ../file-explorer-ui/Justfile --working-directory ../file-explorer-ui dist

# Run http-server
run: dist
cargo r -- start
20 changes: 0 additions & 20 deletions src/http-server/Makefile

This file was deleted.

14 changes: 14 additions & 0 deletions test/Justfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
set dotenv-load
set positional-arguments

# List Tasks
default:
just --list

# Run tests
run: build
cargo test

# Build release artifacts
build:
just --justfile ../Justfile --working-directory ../ release
10 changes: 0 additions & 10 deletions test/Makefile

This file was deleted.

Loading