Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Rust implementation :)

License

NotificationsYou must be signed in to change notification settings

mads256h/stregsystemet-rs

Repository files navigation

stregsystem-rs is the rust edition of the stregsystem, with additional improvements.Some parts are still WIP.

Building

Build the project with

cargo build

Developing

Make sure that rust is installed on your system.You will need to installsqlx-cli.

cargo install sqlx-cli

After this step create a file in the root of the project named.env.This file should contain the following:

DATABASE_URL=postgres://stregsystemet:password@localhost/stregsystemet

The before you can build the project you need to run a postgres instance.Included in the project are scripts that starts an emphemeral postgres instance using docker (or podman).To start postgres run the following script:

./scripts/start_postgres.sh

On Windows this is

scripts\start_postgres.bat

Afterwards the database schema must be initialized by running:

./scripts/init_db.sh

On Windows:

scripts\init_db.bat

Optionally you can insert test data into the database:

./scripts/populate_sample_data.sh

On Windows:

scripts\populate_sample_data.bat

You can now build and run the project with:

cargo run

Before you commit your changes you must format the code and satisfy the linter:

cargo fmtcargo clippy

Lastly, you have to update the sqlx files if you have updated any files with sql:

cargo sqlx prepare

[8]ページ先頭

©2009-2025 Movatter.jp