Stability-AI / StableStudio

Community interface for generative AI
MIT License
8.73k stars 869 forks source link

Lack of clarity around dev setup with tauri #99

Closed metamas closed 1 year ago

metamas commented 1 year ago

Describe the bug Following the provided instructions does not get get one to a running development environment with tauri.

To Reproduce After running yarn install from the project root, and then running cargo tauri build or cargo tauri dev, you get:

error: no such command: `tauri`
View all installed commands with `cargo --list`

This same error shows if you run yarn dev from either the project root or within packages/stablestudio-ui/src-tauri.

There is no Cargo.toml in the root directory, so I went to packages/stablestudio-ui/src-tauri and ran cargo build, then tried all of the above again. Still no luck.

Finally I installed the Tauri CLI globally with npm install -g @tauri-apps/cli, and then ran tauri dev, which seems to get things running as expected — the UI is currently launched and still "Downloading ComfyUI..." (I have a slow connection).

Expected behavior It seems the instructions should be clearer to get a development environment running for the tauri branch.

If I'm right about a need for these clarifications, I'm happy to PR with improved instructions. But first I need to be sure about what's going on here, and what I may still be missing. Admittedly, the Rust toolchain is pretty unfamiliar to me.

Seems like the major issue is that cargo does not have access to a tauri executable, even after running cargo build within packages/stablestudio-ui/src-tauri. Even trying cargo install tauri will tell you that its a library only crate.

error: there is nothing to install in `tauri v1.4.1`, because it has no binaries
`cargo install` is only for installing programs, and can't be used with libraries.
To use a library crate, add it as a dependency to a Cargo project with `cargo add`.

Desktop:

KAJdev commented 1 year ago

I believe the required fix would be adding cargo install tauri-cli to the build steps, thanks for raising this. It should be a quick PR, or I can do it.

KAJdev commented 1 year ago

I believe this has been clarified with f3b7d20

metamas commented 1 year ago

That would also install tauri CLI globally, like I did with npm install -g @tauri-apps/cli, correct? Is there a difference/preference between which package manager you use to install the tauri CLI?