update for new version + backend info

master
Ales Katona 6 years ago
parent 8a0f04c148
commit 5731589a74
Signed by: almindor
GPG Key ID: 08C459E2D8ABB7E8

@ -1,6 +1,6 @@
[package]
name = "prongs"
version = "0.0.1"
version = "0.0.2"
authors = ["Ales Katona <almindor@gmail.com>"]
edition = "2018"
readme = "README.md"

@ -4,14 +4,15 @@ Input handling schema written in rust. Backend agnostic, provides serializabilit
Current backends include Piston and Gilrs with more on the way.
**NOTE** prongs requires rust 1.32 or later
**WARNING** prongs is alpha level at this point. APIs will most probably change.
**NOTE** prongs requires rust 1.32 or later.
## Using prongs library
To use the prongs library include it in your `Cargo.toml` file. You *MUST* specify a backend via features e.g.
```
[dependencies]
prongs = { version = "1.0.2", features = ["backend_piston"] }
prongs = { version = "0.0.2", features = ["backend_piston"] }
```
### Documentation
@ -70,3 +71,8 @@ To build you need to specify the required backends e.g. `cargo build --features
Same goes for testing `cargo test --features backend_piston,backend_gilrs`
If you don't specify a backend the tests for it will not be compiled and won't run.
### Adding a new backend
To add a new backend one must implement the ToEventType trait on the backend's event.
Additionally a specialized `SchemaBackendName` newtype has to be created that will hold the actual Schema object specialized to backend's types for `TEventType` and `TControllerID`.
Lastly the new schema has to be made visible in the main module under a configuration with the backend feature. Cargo.toml has to be expanded with the backend's dependencies marked optional and the new feature named.

Loading…
Cancel
Save