7 Commits
0.1.1 ... 0.1.2

Author SHA1 Message Date
f9db7deed1 Update ipc_handler with breaking change
All checks were successful
Main workflow / Lint code & build (push) Successful in 5m23s
2024-04-27 10:48:16 +02:00
2ddc8b9091 Update all non-major dependencies
Some checks failed
Main workflow / Lint code & build (push) Failing after 3m4s
2024-04-27 04:41:03 +00:00
5b10e60102 Enable weekly renovate schedule
All checks were successful
Main workflow / Lint code & build (push) Successful in 5m8s
2024-03-08 10:46:36 +01:00
7b39e2c243 Fix webview after breaking change
All checks were successful
Main workflow / Lint code & build (push) Successful in 5m12s
2024-03-07 11:59:46 +01:00
c9c6477133 Update all non-major dependencies
Some checks failed
Main workflow / Lint code & build (push) Failing after 2m41s
2024-03-07 10:40:56 +00:00
b310d54a43 Add renovate config
All checks were successful
Main workflow / Lint code & build (push) Successful in 6m35s
2024-03-07 11:01:58 +01:00
9014fe3023 Add ci
All checks were successful
Main workflow / Lint code & build (push) Successful in 6m32s
2024-03-07 10:54:05 +01:00
5 changed files with 196 additions and 943 deletions

66
.github/workflows/main.yaml vendored Normal file
View 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
View 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"],
}

1044
Cargo.lock generated

File diff suppressed because it is too large Load Diff

View File

@@ -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.27.1"
wry = "0.39.3"

View File

@@ -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()?;