Compare commits
16 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 0c5cf173a6 | |||
| c0eca40382 | |||
| bd563c4785 | |||
| 9c29a99731 | |||
| 0f4fc07416 | |||
| 989b3af4c1 | |||
| d11952525e | |||
| 6dbadf1e74 | |||
| 08c28830b0 | |||
| f9db7deed1 | |||
| 2ddc8b9091 | |||
| 5b10e60102 | |||
| 7b39e2c243 | |||
| c9c6477133 | |||
| b310d54a43 | |||
| 9014fe3023 |
66
.github/workflows/main.yaml
vendored
Normal file
66
.github/workflows/main.yaml
vendored
Normal file
@@ -0,0 +1,66 @@
|
||||
---
|
||||
name: Main workflow
|
||||
|
||||
on:
|
||||
push:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Lint code & build
|
||||
runs-on: ubuntu-22.04
|
||||
timeout-minutes: 10
|
||||
container: alpine:3.19
|
||||
steps:
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
apk update
|
||||
apk add \
|
||||
build-base \
|
||||
git \
|
||||
glib-dev \
|
||||
gtk+3.0-dev \
|
||||
nodejs \
|
||||
webkit2gtk-4.1-dev
|
||||
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup toolchain
|
||||
uses: actions/rs-toolchain@v1
|
||||
with:
|
||||
profile: minimal
|
||||
toolchain: stable
|
||||
override: true
|
||||
components: rustfmt, clippy
|
||||
|
||||
- name: Get Cargo.lock hash
|
||||
id: hash
|
||||
run: |
|
||||
hash="$(sha256sum Cargo.lock | awk '{print $1}')"
|
||||
echo "hash=$hash" >>"$GITHUB_OUTPUT"
|
||||
|
||||
- name: Setup cache
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: |
|
||||
~/.cargo/bin/
|
||||
~/.cargo/registry/index/
|
||||
~/.cargo/registry/cache/
|
||||
~/.cargo/git/db/
|
||||
target/
|
||||
key: cargo-${{ steps.hash.outputs.hash }}
|
||||
|
||||
- name: Run fmt
|
||||
run: cargo fmt --all --check
|
||||
|
||||
- name: Run check
|
||||
run: cargo check
|
||||
|
||||
- name: Run clippy
|
||||
run: cargo clippy -- -D warnings
|
||||
|
||||
- name: Build
|
||||
run: cargo build
|
||||
env:
|
||||
# Disable static linking; rustup's toolchain enables by default for musl
|
||||
RUSTFLAGS: -C target-feature=-crt-static
|
||||
11
.renovaterc.json5
Normal file
11
.renovaterc.json5
Normal file
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
|
||||
"dependencyDashboard": true,
|
||||
"extends": [
|
||||
":enableVulnerabilityAlerts",
|
||||
"group:allNonMajor",
|
||||
"schedule:weekly",
|
||||
"security:openssf-scorecard",
|
||||
],
|
||||
"enabledManagers": ["cargo"],
|
||||
}
|
||||
1129
Cargo.lock
generated
1129
Cargo.lock
generated
File diff suppressed because it is too large
Load Diff
10
Cargo.toml
10
Cargo.toml
@@ -5,10 +5,10 @@ version = "0.1.0"
|
||||
edition = "2021"
|
||||
|
||||
[dependencies]
|
||||
confy = "0.6.0"
|
||||
confy = "0.6.1"
|
||||
dirs = "5.0.1"
|
||||
eyre = "0.6.12"
|
||||
serde = { version = "1.0.196", features = ["derive"] }
|
||||
serde_json = "1.0.113"
|
||||
tao = "0.25.0"
|
||||
wry = "0.36.0"
|
||||
serde = { version = "1.0.199", features = ["derive"] }
|
||||
serde_json = "1.0.116"
|
||||
tao = "0.29.0"
|
||||
wry = "0.42.0"
|
||||
|
||||
@@ -26,21 +26,21 @@ pub fn run(cfg: Config) -> eyre::Result<()> {
|
||||
.ok_or_else(|| eyre!("failed to get vbox"))?,
|
||||
)
|
||||
.with_initialization_script(include_str!("../js/init.js"))
|
||||
.with_ipc_handler(|msg| match serde_json::from_str::<Command>(&msg) {
|
||||
.with_ipc_handler(|req| match serde_json::from_str::<Command>(req.body()) {
|
||||
Ok(cmd) => cmd
|
||||
.handle()
|
||||
.unwrap_or_else(|err| eprintln!("failed to handle command: {err}")),
|
||||
Err(err) => eprintln!("invalid ipc command {msg}: {err}"),
|
||||
Err(err) => eprintln!("invalid ipc command {}: {err}", req.body()),
|
||||
})
|
||||
.with_web_context(&mut context);
|
||||
if cfg.base_url.is_empty() {
|
||||
builder = builder.with_html(include_str!("../html/index.html"))?;
|
||||
builder = builder.with_html(include_str!("../html/index.html"));
|
||||
} else {
|
||||
let mut base_url = cfg.base_url;
|
||||
if !(base_url.starts_with("http://") || base_url.starts_with("https://")) {
|
||||
base_url.insert_str(0, "https://");
|
||||
}
|
||||
builder = builder.with_url(&base_url)?;
|
||||
builder = builder.with_url(&base_url);
|
||||
}
|
||||
let webview = builder.build()?;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user