README
This commit is contained in:
@ -1,18 +1,20 @@
|
||||
This is a Kotlin Multiplatform project targeting Web, Desktop.
|
||||
# Intrinsics UI
|
||||
*The UI powering [https://simd.jaytux.com](https://simd.jaytux.com)*
|
||||
|
||||
* `/composeApp` is for code that will be shared across your Compose Multiplatform applications.
|
||||
It contains several subfolders:
|
||||
- `commonMain` is for code that’s common for all targets.
|
||||
- Other folders are for Kotlin code that will be compiled for only the platform indicated in the folder name.
|
||||
For example, if you want to use Apple’s CoreCrypto for the iOS part of your Kotlin app,
|
||||
`iosMain` would be the right folder for such calls.
|
||||
## Running
|
||||
The Gradle wrapper (`./gradlew`) in the repository can be used to run the project.
|
||||
Currently, two targets are available:
|
||||
- **Web**: The web application uses Kotlin's WASM/JS target and is "optimized" for landscape mode. I am planning to add a portrait mode in the future (together with an Android/iOS version). There are three important Gradle tasks:
|
||||
- `wasmJsBrowserRun`: runs the web application (mostly used for development);
|
||||
- `wasmJsBrowserDistribution`: builds a distribution of the web application, which can be statically served;
|
||||
- `wasmJsBrowserProductionWebpack`: builds a production-ready web application, which can be statically served (this target takes a lot longer to build, but should be more performant/smaller in code size).
|
||||
- **Desktop/JVM**: The desktop application uses Kotlin's JVM target. It has a few important Gradle tasks:
|
||||
- `desktopRun`: runs the desktop application (mostly used for development);
|
||||
- `packageAppImage`, `packageDeb`, `packageDmg`, `packageMsi`: packages the desktop application for distribution on various platforms (Linux, MacOS, Windows).
|
||||
|
||||
The web distribution can be found in `composeApp/build/dist/wasmJs`, and the desktop distribution in `composeApp/build/compose/binaries/main/app`.
|
||||
|
||||
Learn more about [Kotlin Multiplatform](https://www.jetbrains.com/help/kotlin-multiplatform-dev/get-started.html),
|
||||
[Compose Multiplatform](https://github.com/JetBrains/compose-multiplatform/#compose-multiplatform),
|
||||
[Kotlin/Wasm](https://kotl.in/wasm/)…
|
||||
You can also use the `./package.sh` script to build both (for Desktop, the AppImage will be built). This script also generates a compressed archive (`.tar.gz`) for both.
|
||||
|
||||
We would appreciate your feedback on Compose/Web and Kotlin/Wasm in the public Slack channel [#compose-web](https://slack-chats.kotlinlang.org/c/compose-web).
|
||||
If you face any issues, please report them on [GitHub](https://github.com/JetBrains/compose-multiplatform/issues).
|
||||
|
||||
You can open the web application by running the `:composeApp:wasmJsBrowserDevelopmentRun` Gradle task.
|
||||
## Configuring
|
||||
The only configuration is the backend URL. At the moment, it is set explicitly in the code, but I might change that. To change it, change the value `com.jaytux.simd.frontend.client.Client.baseUrl` in `/composeApp/src/commonMain/kotlin/com/jaytux/simd/frontend/client/Client.kt`.
|
Reference in New Issue
Block a user