-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
style: Format code, add documentation and update README
- Loading branch information
Showing
6 changed files
with
50 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,40 @@ | ||
# Sealupd | ||
|
||
Updater for [SealDice](https://github.com/sealdice), successor of [seal-updater](https://github.com/sealdice/seal-updater). | ||
Updater for [SealDice], successor of [seal-updater]. | ||
|
||
# Usage | ||
|
||
The program accepts to principal arguments: `--package` (short `-p`, alias `--upgrade`) and `--pid`. It waits for the process with the specified PID to terminate before extracting files from the provided package into the current directory. Finally, it tries to start the executable named `sealdice-core` or `sealdice-core.exe` unless the `--skip-launch` flag is set. | ||
|
||
For a full definition of acceptable arguments and flags, see `src/cli.rs`. | ||
|
||
# Development | ||
|
||
> [!WARNING] | ||
> Please use Rust 1.80.0 and above to build this project, as it uses new features such as `std::sync::LazyLock`. | ||
> Please use Rust 1.80.0 and above to build this project, as it leverages new features such as `std::sync::LazyLock`. | ||
## Style Guides | ||
|
||
1. Use `cargo fmt` without any options to format the project. Do not use `rustfmt` as it formats on a per-file basis and removes disambiguate imports. | ||
|
||
2. Import types directly; prefer `File` instead of `std::fs::File` or `fs::File`, unless ambiguity forbids (`Error` and `io::Error`). | ||
|
||
3. Import functions by their immediate parent module; prefer `io::stdin()` instead of `std::io::stdin()` or `stdin()`. | ||
|
||
## TODO | ||
|
||
- [x] Implement business logic. | ||
- [x] Add log information. | ||
- [x] Add manifest and static build for Windows (via `embed_manifest` and `static_vcruntime`). | ||
- [ ] CI/CD | ||
- [ ] Tests | ||
- [ ] CI/CD & auto-release | ||
- [ ] Tests | ||
- [ ] Make [SealDice] migrate from the old [seal-updater]. | ||
|
||
## Other Notes | ||
|
||
- We might need a graceful way to log and print information rather than littering `debug!()` and `println!()` everywhere. | ||
|
||
- The current implementation of `proc::wait()` is the best we can do, but feedback we got from [seal-updater] proves it is not always reliable. | ||
|
||
[SealDice]: https://github.com/sealdice | ||
[seal-updater]: https://github.com/sealdice/seal-updater |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters