Skip to content

Commit 9bc3003

Browse files
committed
Use workplaces
1 parent ffcfa74 commit 9bc3003

File tree

138 files changed

+1091
-458
lines changed

Some content is hidden

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

138 files changed

+1091
-458
lines changed

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
/css/*-user.css
1515
/hyphenation-patterns
1616
/dictionaries
17-
/src/mupdf_wrapper/*/
1817
/dist
1918
/standalone
2019
/plato-*.zip

Cargo.lock

Lines changed: 64 additions & 36 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 9 additions & 84 deletions
Original file line numberDiff line numberDiff line change
@@ -1,87 +1,12 @@
1-
[package]
2-
authors = ["Bastien Dejean <[email protected]>"]
3-
name = "plato"
4-
version = "0.9.31"
5-
edition = "2021"
6-
7-
[[bin]]
8-
name = "plato"
9-
path = "src/main.rs"
10-
11-
[[bin]]
12-
name = "plato-import"
13-
path = "src/importer.rs"
14-
required-features = ["importer"]
15-
16-
[[bin]]
17-
name = "plato-emulator"
18-
path = "src/emulator.rs"
19-
required-features = ["emulator"]
20-
21-
[[bin]]
22-
name = "article_fetcher"
23-
path = "src/fetcher.rs"
24-
required-features = ["fetcher"]
25-
26-
[dependencies]
27-
bitflags = "1.3.2"
28-
downcast-rs = "1.2.0"
29-
lazy_static = "1.4.0"
30-
libc = "0.2.132"
31-
png = "0.17.5"
32-
regex = "1.6.0"
33-
serde = { version = "1.0.144", features = ["derive"] }
34-
serde_json = "1.0.85"
35-
titlecase = "2.2.0"
36-
unicode-normalization = "0.1.21"
37-
toml = "0.5.9"
38-
zip = "0.6.2"
39-
kl-hyphenate = "0.7.3"
40-
entities = "1.0.1"
41-
paragraph-breaker = "0.4.4"
42-
xi-unicode = "0.3.0"
43-
septem = "1.1.0"
44-
byteorder = "1.4.3"
45-
flate2 = "1.0.24"
46-
levenshtein = "1.0.5"
47-
nix = "0.25.0"
48-
indexmap = { version = "1.9.1", features = ["serde-1"] }
49-
anyhow = "1.0.63"
50-
thiserror = "1.0.33"
51-
walkdir = "2.3.2"
52-
globset = "0.4.9"
53-
filetime = "0.2.17"
54-
fxhash = "0.2.1"
55-
rand_core = "0.6.3"
56-
rand_xoshiro = "0.6.0"
57-
percent-encoding = "2.1.0"
58-
59-
[dependencies.getopts]
60-
version = "0.2.21"
61-
optional = true
62-
63-
[dependencies.reqwest]
64-
version = "0.11.11"
65-
features = ["rustls-tls", "json", "blocking"]
66-
default-features = false
67-
optional = true
68-
69-
[dependencies.chrono]
70-
features = ["serde"]
71-
version = "0.4.22"
72-
73-
[dependencies.sdl2]
74-
version = "0.35.2"
75-
optional = true
76-
77-
[dependencies.signal-hook]
78-
version = "0.3.14"
79-
optional = true
80-
81-
[features]
82-
importer = ["getopts"]
83-
emulator = ["sdl2"]
84-
fetcher = ["reqwest", "signal-hook"]
1+
[workspace]
2+
3+
members = [
4+
"crates/core",
5+
"crates/plato",
6+
"crates/emulator",
7+
"crates/importer",
8+
"crates/fetcher",
9+
]
8510

8611
[profile.release-minsized]
8712
inherits = "release"

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ WORKDIR /plato
4141

4242
ADD . /plato
4343

44-
# Plato requires a specific version of the mupdf dev library for src/mupdf_wrapper
44+
# Plato requires a specific version of the mupdf dev library for /mupdf_wrapper
4545
RUN cd /plato/thirdparty && ./download.sh mupdf
4646

4747
CMD ["./build.sh"]

Dockerfile.dev

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,4 @@ WORKDIR /plato
2222

2323
ADD . /plato
2424

25-
CMD ["bash", "-c", "cd /plato/src/mupdf_wrapper && ./build.sh && cd /plato/ && cargo test && cargo build --all-features"]
25+
CMD ["bash", "-c", "cd /plato/mupdf_wrapper && ./build.sh && cd /plato/ && cargo test && cargo build --all"]

build.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,8 @@ case "$method" in
6363
;;
6464
esac
6565

66-
cd src/mupdf_wrapper
66+
cd mupdf_wrapper
6767
./build-kobo.sh
68-
cd ../..
68+
cd ..
6969

70-
cargo build --release --target=arm-unknown-linux-gnueabihf
70+
cargo build --release --target=arm-unknown-linux-gnueabihf -p plato

crates/core/Cargo.toml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
[package]
2+
authors = ["Bastien Dejean <[email protected]>"]
3+
name = "core"
4+
version = "0.9.31"
5+
edition = "2021"
6+
7+
[lib]
8+
crate-type = ["rlib"]
9+
10+
[dependencies]
11+
bitflags = "1.3.2"
12+
downcast-rs = "1.2.0"
13+
lazy_static = "1.4.0"
14+
libc = "0.2.132"
15+
png = "0.17.5"
16+
regex = "1.6.0"
17+
serde = { version = "1.0.144", features = ["derive"] }
18+
serde_json = "1.0.85"
19+
titlecase = "2.2.0"
20+
unicode-normalization = "0.1.21"
21+
toml = "0.5.9"
22+
zip = "0.6.2"
23+
kl-hyphenate = "0.7.3"
24+
entities = "1.0.1"
25+
paragraph-breaker = "0.4.4"
26+
xi-unicode = "0.3.0"
27+
septem = "1.1.0"
28+
byteorder = "1.4.3"
29+
flate2 = "1.0.24"
30+
levenshtein = "1.0.5"
31+
nix = "0.25.0"
32+
indexmap = { version = "1.9.1", features = ["serde-1"] }
33+
anyhow = "1.0.63"
34+
thiserror = "1.0.33"
35+
walkdir = "2.3.2"
36+
globset = "0.4.9"
37+
filetime = "0.2.17"
38+
fxhash = "0.2.1"
39+
rand_core = "0.6.3"
40+
rand_xoshiro = "0.6.0"
41+
percent-encoding = "2.1.0"
42+
chrono = { version = "0.4.22", features = ["serde"] }

build.rs renamed to crates/core/build.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ fn main() {
66
// Cross-compiling for Kobo.
77
if target == "arm-unknown-linux-gnueabihf" {
88
println!("cargo:rustc-env=PKG_CONFIG_ALLOW_CROSS=1");
9-
println!("cargo:rustc-link-search=src/mupdf_wrapper/Kobo");
9+
println!("cargo:rustc-link-search=target/mupdf_wrapper/Kobo");
1010
println!("cargo:rustc-link-search=libs");
1111
println!("cargo:rustc-link-lib=dylib=stdc++");
1212
println!("cargo:rustc-link-lib=z");
@@ -19,14 +19,13 @@ fn main() {
1919
// Handle the Linux and macOS platforms.
2020
} else {
2121
let target_os = env::var("CARGO_CFG_TARGET_OS").unwrap();
22-
2322
match target_os.as_ref() {
2423
"linux" => {
25-
println!("cargo:rustc-link-search=src/mupdf_wrapper/Linux");
24+
println!("cargo:rustc-link-search=target/mupdf_wrapper/Linux");
2625
println!("cargo:rustc-link-lib=dylib=stdc++");
2726
},
2827
"macos" => {
29-
println!("cargo:rustc-link-search=src/mupdf_wrapper/Darwin");
28+
println!("cargo:rustc-link-search=target/mupdf_wrapper/Darwin");
3029
println!("cargo:rustc-link-lib=dylib=c++");
3130
},
3231
_ => panic!("Unsupported platform: {}.", target_os),
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)