Skip to content

Commit cff1bbb

Browse files
Jan Rüthjanrueth
Jan Rüth
authored andcommitted
Rust rewrite
The previous version in C++ was brittle in may regards. This change reimplements everything in Rust and makes error handling much better. This further packages `es2command-sys` crate which provides a minimal set of headers from the epson source which allows to derive the epsonscan2 library interface without downloading the original source.
1 parent 8978b41 commit cff1bbb

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+5783
-694
lines changed

.cargo/config.toml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
[target.aarch64-unknown-linux-gnu]
2+
strip = { path = "aarch64-linux-gnu-strip" }
3+
objcopy = { path = "aarch64-linux-gnu-objcopy" }
4+
5+
[target.armv7-unknown-linux-gnueabihf]
6+
strip = { path = "arm-linux-gnueabihf-strip" }
7+
objcopy = { path = "arm-linux-gnueabihf-objcopy" }

.github/workflows/build.yaml

Lines changed: 0 additions & 47 deletions
This file was deleted.

.github/workflows/ci.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Rust check
2+
3+
on:
4+
push:
5+
branches: [ "main" ]
6+
pull_request:
7+
branches: [ "main" ]
8+
9+
env:
10+
CARGO_TERM_COLOR: always
11+
RUSTFLAGS: -Dwarnings
12+
13+
jobs:
14+
build:
15+
runs-on: ubuntu-latest
16+
17+
steps:
18+
- uses: actions/checkout@v3
19+
- name: Install dependencies
20+
run: sudo apt-get install -y libssl-dev pkg-config clang build-essential libusb-1.0-0 libusb-1.0-0-dev g++ g++-aarch64-linux-gnu g++-arm-linux-gnueabihf
21+
- name: Install rust dependencies
22+
run: cargo install cross --git https://github.com/cross-rs/cross && cargo install cargo-deb cargo-sort
23+
- name: Lint
24+
run: make lint
25+
- name: Tests usual
26+
run: make test
27+
- name: Build x86_64
28+
run: make build && make deb
29+
- name: Build aarch64
30+
run: TARGET=aarch64-unknown-linux-gnu make build-cross && TARGET=aarch64-unknown-linux-gnu make deb
31+
- name: Build armv7
32+
run: TARGET=armv7-unknown-linux-gnueabihf make build-cross && TARGET=armv7-unknown-linux-gnueabihf make deb
33+
- uses: actions/upload-artifact@v3
34+
with:
35+
name: packages
36+
path: target/debian/*.deb

.github/workflows/native.yaml

Lines changed: 0 additions & 24 deletions
This file was deleted.

.gitignore

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,3 @@
1-
Makefile
2-
epsonscan2-*
3-
CMakeFiles
4-
CMakeCache.txt
5-
cmake_install.cmake
6-
ess2devstate
71
.vscode
8-
build
92
.DS_Store
10-
include/*
3+
target/

CMakeLists.txt

Lines changed: 0 additions & 129 deletions
This file was deleted.

0 commit comments

Comments
 (0)