mirror of
https://github.com/InsanusMokrassar/SDI.git
synced 2024-11-08 09:23:57 +00:00
fill README
This commit is contained in:
parent
376d29046f
commit
4103aebaad
27
README.md
27
README.md
@ -1,2 +1,29 @@
|
||||
# SDI
|
||||
|
||||
It is simple (in comparison with other systems) DI, which aim to be compatible and predictable.
|
||||
|
||||
## Availability platforms
|
||||
|
||||
* [x] JVM
|
||||
* [ ] JS
|
||||
* [ ] Native
|
||||
|
||||
## Required environment
|
||||
|
||||
To use this library you will need two things:
|
||||
|
||||
* Json serializer
|
||||
* Json config
|
||||
|
||||
Unfortunately, currently not supported other formats (due to
|
||||
[issue in Kotlinx.serialization](https://github.com/Kotlin/kotlinx.serialization/issues/615))
|
||||
|
||||
## Rules
|
||||
|
||||
Full examples of usage you can find in [tests](src/commonTest/kotlin/com/insanusmokrassar/sdi). In two words, there are
|
||||
a few rules for constructing of config:
|
||||
|
||||
* Config root is an Json Object
|
||||
* Config root names will be used as dependency names
|
||||
* In the config dependency names can be used everywhere
|
||||
* In places, where dependency will be injected, must be used `@ContextualSerializer` annotation or `@Serializer(ContextSerializer::class)`
|
||||
|
Loading…
Reference in New Issue
Block a user