27 lines
1.1 KiB
Markdown
27 lines
1.1 KiB
Markdown
# Development
|
|
|
|
The desktop crate defines the entrypoint for the desktop app along with any assets, components and dependencies that are specific to desktop builds. The desktop crate starts out something like this:
|
|
|
|
```
|
|
desktop/
|
|
├─ assets/ # Assets used by the desktop app - Any platform specific assets should go in this folder
|
|
├─ src/
|
|
│ ├─ main.rs # The entrypoint for the desktop app.
|
|
├─ Cargo.toml # The desktop crate's Cargo.toml - This should include all desktop specific dependencies
|
|
```
|
|
|
|
## Dependencies
|
|
Since you have fullstack enabled, the desktop crate will be built two times:
|
|
1. Once for the server build with the `server` feature enabled
|
|
2. Once for the client build with the `desktop` feature enabled
|
|
|
|
You should make all desktop specific dependencies optional and only enabled in the `desktop` feature. This will ensure that the server builds don't pull in desktop specific dependencies which cuts down on build times significantly.
|
|
|
|
### Serving Your Desktop App
|
|
|
|
You can start your desktop app with the following command:
|
|
|
|
```bash
|
|
dx serve
|
|
```
|