Set up the skyshift Cargo project
A terminal app (ratatui) to track work shifts, built on stable Rust, edition 2024. - Cargo.toml: eight well-known crates, each with a comment saying why: ratatui (UI), jiff (dates and time zones), serde + toml + serde_json (files), directories (per-OS folders), arboard (clipboard), anyhow. - .cargo/config.toml: static C runtime on Windows, so the .exe runs without the Visual C++ Redistributable; `cargo lint` alias. - rustfmt.toml: one formatting style for `cargo fmt`. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
commit
f646da0a8e
6 files changed
+1563
No files matched your search
@@ -0,0 +1,8 @@
|
||||
# Windows (MSVC): link the C runtime statically, so skyshift.exe runs on any
|
||||
# Windows 10/11 machine without installing the "Visual C++ Redistributable".
|
||||
[target.'cfg(all(windows, target_env = "msvc"))']
|
||||
rustflags = ["-C", "target-feature=+crt-static"]
|
||||
|
||||
[alias]
|
||||
# `cargo lint`: the strict check to run before committing.
|
||||
lint = "clippy --all-targets -- -D warnings"
|
||||
@@ -0,0 +1 @@
|
||||
/target
|
||||
Generated
+1495
File diff suppressed because it is too large.
Load diff
+47
@@ -0,0 +1,47 @@
|
||||
[package]
|
||||
name = "skyshift"
|
||||
version = "0.1.0"
|
||||
edition = "2024"
|
||||
# 1.89 is the first Rust with `std::fs::File::try_lock` (used to stop two copies
|
||||
# of skyshift from writing the same data file).
|
||||
rust-version = "1.89"
|
||||
description = "Track your work shifts from the terminal, including shifts that run past midnight."
|
||||
publish = false
|
||||
|
||||
[dependencies]
|
||||
# Terminal user interface. The crossterm backend works on Windows, Linux and macOS.
|
||||
# Default features are off to skip widgets we don't use (the calendar widget
|
||||
# would pull in a second date/time library).
|
||||
ratatui = { version = "0.30", default-features = false, features = ["crossterm_0_29", "layout-cache"] }
|
||||
|
||||
# Dates, times and time zones. Time zones are plain runtime values, so the
|
||||
# "timezone override" setting stays simple, and daylight saving time is handled.
|
||||
jiff = { version = "0.2", features = ["serde"] }
|
||||
|
||||
# Reading and writing files: settings and data in TOML, exports in JSON.
|
||||
serde = { version = "1", features = ["derive"] }
|
||||
toml = "1"
|
||||
serde_json = "1"
|
||||
|
||||
# The standard per-OS folders (%APPDATA% on Windows, ~/.config and
|
||||
# ~/.local/share on Linux).
|
||||
directories = "6"
|
||||
|
||||
# System clipboard. Text only (no default features = no image support).
|
||||
# On Linux this covers both X11 and Wayland without any system libraries.
|
||||
arboard = { version = "3", default-features = false, features = ["wayland-data-control"] }
|
||||
|
||||
# Error type with context, used where many different errors meet (startup, files).
|
||||
anyhow = "1"
|
||||
|
||||
[lints.rust]
|
||||
unsafe_code = "forbid"
|
||||
|
||||
[lints.clippy]
|
||||
all = { level = "warn", priority = -1 }
|
||||
|
||||
[profile.release]
|
||||
# Smaller, faster binary. `strip` removes debug symbols from the executable.
|
||||
lto = "thin"
|
||||
codegen-units = 1
|
||||
strip = true
|
||||
@@ -0,0 +1,4 @@
|
||||
# `cargo fmt` formats all the code the same way. Run it after editing.
|
||||
max_width = 110
|
||||
# Keep short expressions on one line (like `if a { b } else { c }`).
|
||||
use_small_heuristics = "Max"
|
||||
@@ -0,0 +1,8 @@
|
||||
//! skyshift: track your work shifts from the terminal.
|
||||
//!
|
||||
//! The real entry point comes last, once the app core exists. Until
|
||||
//! then this only declares the modules written so far.
|
||||
#![allow(dead_code)]
|
||||
|
||||
|
||||
fn main() {}
|
||||
Reference in new issue
Block a user