Crates.io | onlivfe |
lib.rs | onlivfe |
version | 0.0.0-alpha.0 |
source | src |
created_at | 2023-01-11 11:30:41.509057 |
updated_at | 2023-01-11 11:30:41.509057 |
description | The core powering listing social (VR) platforms' peeps |
homepage | |
repository | https://github.com/onlivfe/core |
max_upload_size | |
id | 756347 |
size | 10,047 |
Onlivfe core is the a library that provides the models & some of the logic for onlivfe. It's usage is not supported outside of the onlivfe ecosystem, though we won't stop others from using it. Also note that the license is AGPL.
Basic requirements:
Start off by cloning the project with git.
git clone https://github.com/onlivfe/core
Then open the project folder in your terminal, & run cargo build
.
Then get to hacking, & optionally replace the dependency in other projects by overriding dependencies.
Generally speaking, you first generate a new migration:
sqlx migrate add NAME_OF_MIGRATION
Then write the SQL changes, and then re-generate the schema by running the migrations:
# Drop DB, recreate it and run all migrations
sqlx database drop && sqlx database create && sqlx migrate run
# Save metadata
cargo sqlx prepare
Note that serde
by default fails at deserializing the whole response if even a single part is unexpected.
Which is why we should generally allow data to just be missing, and use serde_with
's VecSkipError
and DefaultOnError
.
Beyond that, we should try to respect the platforms that we interact with, and generally follow rate limits and/or wishes of said platforms developers, up to a reasonable extent. However, as our application is meant for interoperability, which some platforms may not like, thus we must not bow down to any singular platform too much either.