Skip to content

Commit 0a96639

Browse files
committed
release: 1.3.0
2 parents 81825b5 + a757df3 commit 0a96639

File tree

6 files changed

+92
-87
lines changed

6 files changed

+92
-87
lines changed

CREDITS.md

Lines changed: 45 additions & 46 deletions
Large diffs are not rendered by default.

justfile

Lines changed: 26 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,12 @@ release_dir := justfile_directory() + "/release"
2828

2929

3030

31-
#export RUSTFLAGS := "-Ctarget-cpu=x86-64-v3 -Cllvm-args=--cost-kind=throughput -Clinker-plugin-lto -Clink-arg=-fuse-ld=lld"
32-
#export CC := "clang"
33-
#export CXX := "clang++"
34-
#export CFLAGS := "-Wall -Wextra -flto -march=x86-64-v3"
35-
#export CXXFLAGS := "-Wall -Wextra -flto -march=x86-64-v3"
31+
export RUSTFLAGS := "-Ctarget-cpu=x86-64-v3 -Cllvm-args=--cost-kind=throughput -Clinker-plugin-lto -Clink-arg=-fuse-ld=lld"
32+
export CC := "clang"
33+
export CXX := "clang++"
34+
export CFLAGS := `llvm-config --cflags` + " -march=x86-64-v3 -Wall -Wextra -flto"
35+
export CXXFLAGS := `llvm-config --cxxflags` + " -march=x86-64-v3 -Wall -Wextra -flto"
36+
export LDFLAGS := `llvm-config --ldflags` + " -fuse-ld=lld -flto"
3637

3738

3839

@@ -132,46 +133,50 @@ release_dir := justfile_directory() + "/release"
132133
# Unit tests!
133134
@test:
134135
clear
136+
135137
cargo test \
138+
--release \
136139
--workspace \
137140
--target-dir "{{ cargo_dir }}"
141+
142+
just _test-debug
143+
144+
# Unit Tests (Debug).
145+
_test-debug:
146+
#!/usr/bin/env bash
147+
set -e
148+
149+
unset -v RUSTFLAGS CC CXX CFLAGS CXXFLAGS LDFLAGS
150+
138151
cargo test \
139-
--release \
140152
--workspace \
141153
--target-dir "{{ cargo_dir }}"
142154

143155

144156
# Get/Set version.
145157
version:
146158
#!/usr/bin/env bash
159+
set -e
147160

148161
# Current version.
149-
_ver1="$( toml get "{{ pkg_dir1 }}/Cargo.toml" package.version | \
150-
sed 's/"//g' )"
162+
_ver1="$( tomli query -f "{{ pkg_dir1 }}/Cargo.toml" package.version | \
163+
sed 's/[" ]//g' )"
151164
152165
# Find out if we want to bump it.
166+
set +e
153167
_ver2="$( whiptail --inputbox "Set {{ pkg_name }} version:" --title "Release Version" 0 0 "$_ver1" 3>&1 1>&2 2>&3 )"
154168
155169
exitstatus=$?
156170
if [ $exitstatus != 0 ] || [ "$_ver1" = "$_ver2" ]; then
157171
exit 0
158172
fi
159-
160-
fyi success "Setting version to $_ver2."
173+
set -e
161174
162175
# Set the release version!
163-
just _version "{{ pkg_dir1 }}" "$_ver2"
164-
just _version "{{ pkg_dir2 }}" "$_ver2"
176+
tomli set -f "{{ pkg_dir1 }}/Cargo.toml" -i package.version "$_ver2"
177+
tomli set -f "{{ pkg_dir2 }}/Cargo.toml" -i package.version "$_ver2"
165178
166-
167-
# Set version for real.
168-
@_version DIR VER:
169-
[ -f "{{ DIR }}/Cargo.toml" ] || exit 1
170-
171-
# Set the release version!
172-
toml set "{{ DIR }}/Cargo.toml" package.version "{{ VER }}" > /tmp/Cargo.toml
173-
just _fix-chown "/tmp/Cargo.toml"
174-
mv "/tmp/Cargo.toml" "{{ DIR }}/Cargo.toml"
179+
fyi success "Set version to $_ver2."
175180
176181
177182
# Init dependencies.

refract/Cargo.toml

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "refract"
3-
version = "1.2.0"
3+
version = "1.3.0"
44
license = "WTFPL"
55
authors = ["Josh Stoik <josh@blobfolio.com>"]
66
edition = "2024"
@@ -107,7 +107,7 @@ features = [ "png" ]
107107

108108
[dependencies]
109109
dactyl = "0.13.*"
110-
dowser = "0.16.*"
110+
dowser = "0.17.*"
111111
fyi_ansi = "2.2.*"
112112
open = "=5.3.2"
113113
rfd = "=0.15.4"
@@ -118,18 +118,19 @@ write_atomic = "0.7.*"
118118
version = "0.13.*"
119119
features = [ "try_paths" ]
120120

121-
[dependencies.async-std]
122-
version = "=1.13.*"
123-
default-features = false
124-
125121
[dependencies.iced]
126122
version = "=0.13.1"
127-
features = [ "async-std", "image-without-codecs" ]
123+
features = [ "image-without-codecs", "tokio" ]
128124

129125
[dependencies.refract_core]
130126
path = "../refract_core"
131127
features = [ "images" ]
132128

129+
[dependencies.tokio]
130+
version = "=1.47.*"
131+
default-features = false
132+
features = [ "rt", "rt-multi-thread", "time" ]
133+
133134
[dependencies.utc2k]
134135
version = "0.17.*"
135136
features = [ "local" ]

refract/src/app.rs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ impl App {
262262
Argument::Key("-V" | "--version") => return Err(RefractError::PrintVersion),
263263

264264
Argument::KeyWithValue("-l" | "--list", s) => {
265-
let _res = paths.read_paths_from_file(s);
265+
let _res = paths.push_paths_from_file(s);
266266
},
267267

268268
Argument::Path(s) => { paths = paths.with_path(s); },
@@ -501,7 +501,7 @@ impl App {
501501
let confirm = ! self.has_flag(OTHER_SAVE_AUTO);
502502
if let Some(current) = &mut self.current {
503503
// Advance iterator and wait for feedback.
504-
if current.next_candidate_done(wrapper) {
504+
if let Some(wrapper) = wrapper && current.next_candidate_done(wrapper) {
505505
self.flags |= OTHER_BSIDE;
506506
return Task::none();
507507
}
@@ -574,7 +574,7 @@ impl App {
574574
else {
575575
self.flags |= SWITCHED_ENCODER;
576576
Task::future(async {
577-
async_std::task::sleep(Duration::from_millis(1500)).await;
577+
tokio::time::sleep(Duration::from_millis(1500)).await;
578578
Message::UnsetFlag(SWITCHED_ENCODER)
579579
})
580580
.chain(Task::done(Message::NextStep))
@@ -1423,9 +1423,9 @@ impl App {
14231423
.await
14241424
.map(|paths| Task::done(
14251425
Message::AddPaths(
1426-
Dowser::default().with_paths(
1427-
paths.iter().map(rfd::FileHandle::path)
1428-
)
1426+
paths.iter()
1427+
.map(rfd::FileHandle::path)
1428+
.fold(Dowser::default(), Dowser::with_path)
14291429
)
14301430
))
14311431
}).and_then(|t| t)
@@ -1703,11 +1703,11 @@ impl CurrentImage {
17031703
self.candidate = None;
17041704
let borrow = self.iter.take()?;
17051705
Some(Task::future(async {
1706-
let enc = async_std::task::spawn_blocking(||
1706+
let enc = tokio::task::spawn_blocking(||
17071707
EncodeWrapper::from(borrow).advance()
17081708
).await;
17091709

1710-
Message::NextStepDone(enc)
1710+
Message::NextStepDone(enc.ok())
17111711
}))
17121712
}
17131713

@@ -2086,7 +2086,7 @@ pub(super) enum Message {
20862086
/// In most contexts the program will idle after this, waiting for user
20872087
/// feedback, but if we're out of candidates to generate, it'll move onto
20882088
/// `SaveImage`, or `NextEncoder` depending on the state of things.
2089-
NextStepDone(EncodeWrapper),
2089+
NextStepDone(Option<EncodeWrapper>),
20902090

20912091
/// # Save Image (and Continue).
20922092
///

refract_core/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "refract_core"
3-
version = "1.2.0"
3+
version = "1.3.0"
44
license = "WTFPL"
55
authors = ["Josh Stoik <josh@blobfolio.com>"]
66
edition = "2024"
@@ -21,7 +21,7 @@ version = "=0.3.2"
2121
optional = true
2222

2323
[dependencies.link-cplusplus]
24-
version = "=1.0.10"
24+
version = "=1.0.12"
2525
optional = true
2626

2727
[dependencies.lodepng]

release/man/refract.1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
.TH "REFRACT" "1" "August 2025" "refract v1.2.0" "User Commands"
1+
.TH "REFRACT" "1" "September 2025" "refract v1.3.0" "User Commands"
22
.SH NAME
3-
REFRACT \- Manual page for refract v1.2.0.
3+
REFRACT \- Manual page for refract v1.3.0.
44
.SH DESCRIPTION
55
Guided AVIF/JPEG XL/WebP conversion for JPEG and PNG sources.
66
.SS USAGE:

0 commit comments

Comments
 (0)