Getting Started
Try It Online
The Soil library for Kotlin Multiplatform now includes experimental support for Kotlin Wasm. If your browser supports WasmGC, you can run the sample app directly in the browser.
Source code: https://github.com/soil-kt/soil/tree/1.0.0-alpha07/sample/
Browser Support for WasmGC
Currently, the only browsers that support WasmGC are Chrome and Firefox. For the latest compatibility information, please visit https://webassembly.org/features/.
Download
- Prepare a Kotlin Multiplatform project or an Android project
Recommendation
If you are starting a new Kotlin Multiplatform project, tools like the Kotlin Multiplatform Wizard or the Compose Multiplatform Wizard can be very helpful.
- Add Maven Central to your repositories if needed
repositories {
mavenCentral()
}
- Add the desired dependencies to your module's build.gradle file
dependencies {
val soil = "1.0.0-alpha07"
// Query
implementation("com.soil-kt.soil:query-core:$soil")
// Query utilities for Compose
implementation("com.soil-kt.soil:query-compose:$soil")
// optional - helpers for Compose
implementation("com.soil-kt.soil:query-compose-runtime:$soil")
// optional - receivers for Ktor (3.x)
implementation("com.soil-kt.soil:query-receivers-ktor:$soil")
// optional - Test helpers
testImplementation("com.soil-kt.soil:query-test:$soil")
// Form
implementation("com.soil-kt.soil:form:$soil")
// Space
implementation("com.soil-kt.soil:space:$soil")
}
[versions]
soil = "1.0.0-alpha07"
[libraries]
# Query
soil-query-core = { module = "com.soil-kt.soil:query-core", version.ref = "soil" }
# Query utilities for Compose
soil-query-compose = { module = "com.soil-kt.soil:query-compose", version.ref = "soil" }
# optional - helpers for Compose
soil-query-compose-runtime = { module = "com.soil-kt.soil:query-compose-runtime", version.ref = "soil" }
# optional - receivers for Ktor (3.x)
soil-query-receivers-ktor = { module = "com.soil-kt.soil:query-receivers-ktor", version.ref = "soil" }
# optional - Test helpers
soil-query-test = { module = "com.soil-kt.soil:query-test", version.ref = "soil" }
# Form
soil-form = { module = "com.soil-kt.soil:form", version.ref = "soil" }
# Space
soil-space = { module = "com.soil-kt.soil:space", version.ref = "soil" }
Compose Multiplatform compatibility
Supported targets:
- Android
- iOS
- Desktop (JVM)
- Web (Wasm)
What's Next?
Try out the features you're interested in right away!
🌱 Query - A seamless data fetching and caching. written more declaratively, leading to more readable code.
🌱 Form - A extensible validation control and form state management. minimizes the impact of re-composition.
🌱 Space - A flexible scoped state management. collaborating with the navigation library to create new scopes.
Love the project? ⭐ it on GitHub and help us make it even better!