Skip to content

Commit

Permalink
Merge pull request #9 from XanderXAJ/add-readme
Browse files Browse the repository at this point in the history
Add README
  • Loading branch information
SkyLeite authored Oct 24, 2023
2 parents 1ff0b9d + 2c17f0e commit 82f5379
Showing 1 changed file with 64 additions and 0 deletions.
64 changes: 64 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# Decky Plugin CLI

CLI to aid in development of plugins for [Decky Loader](https://github.com/SteamDeckHomebrew/decky-loader).
Used by the [Decky Plugin Template](https://github.com/SteamDeckHomebrew/decky-plugin-template).

## Requirements

A nightly version of rust is required to support the use of pre-release language features.
Here's an easy method to get one:

1. [Install `rustup`.](https://www.rust-lang.org/tools/install)
2. Use `rustup` to install a nightly version of `rust`:

```shell
rustup toolchain install nightly
```

### Ubuntu

These additional dependencies are required to build:

```shell
apt install pkg-config libssl-dev
```

## Development

### Build & Deploy

Build CLI for debugging (output to `./target/debug/decky`):

```shell
cargo +nightly build
```

You can now copy the built binary in to a plugin project for testing (command assumes Decky CLI and your plugin have been cloned alongside each other):

```shell
cp target/debug/decky ../your-decky-plugin/cli/decky
```

Or, if you're planning lots of changes, you could symlink the plugin's binary to your build (command assumes Decky CLI and your plugin have been cloned alongside each other):

```shell
ln -fs ../../cli/target/debug/decky ../your-decky-plugin/cli/decky
```

### Logging

Logging uses [`flexi_logger`](https://docs.rs/flexi_logger/latest/flexi_logger/) and is controlled via the `RUST_LOG` environment variable.

For example, to get debug level logs across the CLI:

```shell
RUST_LOG=DEBUG $CLI_LOCATION/decky plugin build $(pwd)
```

### Local Release

Build CLI for release (output to `./target/release/decky`):

```shell
cargo +nightly build --release
```

0 comments on commit 82f5379

Please sign in to comment.