tenebrous-sheets/README.md

69 lines
1.6 KiB
Markdown
Raw Normal View History

2020-12-09 21:45:56 +00:00
# Tenebrous Sheets
An open source character sheet service for tabletop roleplaying games.
Currently under heavy development.
## Build Instructions
These are very basic build instructions. They assume you already have
2020-12-31 14:09:01 +00:00
cargo set up and installed.
2020-12-09 21:45:56 +00:00
### Install Dependencies
Install dependencies. The exact method depends on your OS.
* sqlite3 and development headers (Void Linux: `xbps-install
sqlite sqlite-devel`, Ubuntu: `apt install sqlite3 libsqlite3-dev`).
* protoc: protocol buffers compiler. There is one baked into the
build, so you should not need this unless you are not using
Linux/Mac/Windows.
### Initial Setup
2020-12-31 14:09:01 +00:00
Follow these instructions from the root of the repository.
Set up database:
2020-12-09 21:45:56 +00:00
```
2020-12-31 14:09:01 +00:00
cargo install --version=0.2.0 sqlx-cli
cargo run --bin tenebrous-migrate
2020-12-09 21:45:56 +00:00
```
### Run Application
If you are using `rustup`, then it should automatically switch to the
2020-12-31 14:09:01 +00:00
stable version of Rust in this repository. This is because of the
2020-12-09 21:45:56 +00:00
`rust-toolchain` file.
Command line "instructions" to build and run the application:
```
cargo run
```
2020-12-31 14:09:01 +00:00
The sqlite database is created in the directory `cargo run` was
invoked from by default. You can also pass a path to a different
location as a single argument to the program.
## Development
Development instructions.
To set up a local database, or run migrations, run:
```
cargo run --bin tenebrous-migrate
```
### Database Queries and Migrations
When adding/updating a compile-checked query or a migration, you need
to update the SQLx data JSON file:
```
cargo sqlx prepare -- --bin tenebrous
```
2020-12-09 21:45:56 +00:00
[rustup]: https://rust-lang.github.io/rustup/index.html