@@ -17,41 +17,78 @@ keywords.workspace = true
17
17
repository.workspace = true
18
18
license.workspace = true
19
19
20
+ # Workspace definition
21
+ # ----------------------------------------------------------------------------------------------------------------------
22
+ [workspace ]
23
+ members = [
24
+ " examples/async" ,
25
+ " examples/serde_demo" ,
26
+ " examples/imginfo" ,
27
+ " examples/imgdump" ,
28
+ " examples/imgviz" ,
29
+ " crates/png2disk" ,
30
+ " crates/ffedit" ,
31
+ " crates/fftool" ,
32
+ " crates/ff_egui_app" ,
33
+ " crates/ff_egui_lib" ,
34
+ " examples/fat"
35
+ ]
36
+
37
+ # Required dependencies
38
+ # ----------------------------------------------------------------------------------------------------------------------
20
39
[dependencies ]
21
40
bit-vec = " 0.8"
22
- bitflags = " 2.6.0 "
41
+ bitflags = " 2.6"
23
42
binrw = " 0.14"
24
43
thiserror = " 2.0"
25
44
logger = " 0.4"
26
45
env_logger = " 0.11"
27
- regex = " 1.10"
28
- log = " 0.4.22"
29
- rand = " 0.8.5"
30
- sha1_smol = " 1.0.1"
46
+ regex = " 1.11"
47
+ log = " 0.4"
48
+ rand = " 0.8"
49
+ sha1_smol = " 1.0"
50
+ dyn-clone = " 1.0"
51
+ strum = { version = " 0.26" , features = [" derive" ] }
52
+
53
+ # Optional dependencies
54
+ # ----------------------------------------------------------------------------------------------------------------------
31
55
32
- # Dependencies for optional features
33
56
# Num-traits and num-derive are used by retrocompressor ('td0' feature)
34
- num-traits = { version = " 0.2.14 " , optional = true }
57
+ num-traits = { version = " 0.2" , optional = true }
35
58
num-derive = { version = " 0.4" , optional = true }
36
59
37
60
# tiny-skia is used by visualization functions ('viz' feature)
38
61
tiny-skia = { version = " 0.11" , optional = true }
39
62
40
63
# flate2 is required for MFI decompression ('mfi' feature)
41
64
flate2 = { version = " 1.0" , optional = true }
42
- histogram = " 0.11"
43
- plotly = { version = " 0.10" , optional = true }
65
+
66
+ # histogram is required for flux timing detection / PLL initialization
67
+ histogram = { version = " 0.11" , optional = true }
68
+
69
+ # plotly is used for plotting flux timings
70
+ plotly = { version = " 0.11" , optional = true }
71
+
72
+ # serde is used for serialization / deserialization of app state and disk images ('serde' feature)
44
73
serde = { version = " 1.0" , optional = true }
74
+
75
+ # typetag is used for serialization / deserialization of dyn trait objects ('serde' feature)
45
76
typetag = { version = " 0.2" , optional = true }
77
+
46
78
wasm-bindgen-futures = { version = " 0.4" , optional = true }
47
79
80
+ # fluxfox_fat is used for reading FAT12/16/32 filesystems if 'fat' feature is enabled
48
81
fluxfox_fat = { git = " https://github.com/dbalsom/fluxfox_fat.git" , package = " fatfs" , branch = " bpb_fix" , default-features = false , features = [" std" , " alloc" , " log_level_debug" ], optional = true }
49
82
83
+ # Native dependencies
84
+ # ----------------------------------------------------------------------------------------------------------------------
50
85
[target .'cfg(not(target_arch = "wasm32"))' .dependencies ]
51
86
zip = { version = " 2.1" , default-features = false , features = [" bzip2" , " deflate" , " deflate64" , " lzma" , " time" , " zstd" ], optional = true }
52
87
tar = { version = " 0.4" , optional = true }
53
88
tokio = { version = " 1" , optional = true , features = [" full" ] }
54
89
90
+ # Wasm32 dependencies
91
+ # ----------------------------------------------------------------------------------------------------------------------
55
92
[target .'cfg(target_arch = "wasm32")' .dependencies ]
56
93
getrandom = { version = " 0.2" , features = [" js" ] }
57
94
zip = { version = " 2.1" , default-features = false , features = [" deflate" , " deflate64" , " lzma" ], optional = true }
@@ -61,49 +98,66 @@ tar = { version = "0.4", optional = true }
61
98
wasm-bindgen = { version = " 0.2" , optional = true }
62
99
wasm-bindgen-futures = { version = " 0.4" , optional = true }
63
100
101
+ # Dev dependencies
102
+ # ----------------------------------------------------------------------------------------------------------------------
64
103
[dev-dependencies ]
65
- sha1 = " 0.10.6 "
104
+ sha1 = " 0.10"
66
105
hex = " 0.4" # or the latest version
67
106
68
- [workspace ]
69
- members = [
70
- " examples/async" ,
71
- " examples/serde_demo" ,
72
- " examples/imginfo" ,
73
- " examples/imgdump" ,
74
- " examples/imgviz" ,
75
- " crates/png2disk" ,
76
- " crates/ffedit" ,
77
- " crates/fftool" ,
78
- " crates/ff_egui_app" ,
79
- " crates/ff_egui_lib"
80
- , " examples/fat" ]
81
-
82
107
[features ]
83
- default = [" viz" , " zip" , " tar" , " mfi" , " td0 " , " fat " ]
108
+ default = [" viz" , " zip" , " tar" , " mfi" , " fat " , " flux " , " ibmpc " , " amiga " ]
84
109
wasm = [" async" , " wasm-bindgen" , " wasm-bindgen-futures" ]
85
110
serde = [" dep:serde" , " dep:typetag" , " bit-vec/serde_std" , " bitflags/serde" ]
86
111
tokio-async = [" async" , " tokio" ]
87
112
async = []
113
+ # ibmpc feature enables IBM PC-specific disk image support (not fully factored out at the moment)
114
+ ibmpc = [" td0" ]
115
+ # amiga feature enables Amiga-specific disk image support
116
+ amiga = [" adf" ]
117
+ # viz feature enables visualization functions - will pull in tiny-skia dependency for drawing
88
118
viz = [" dep:tiny-skia" ]
119
+ # zip feature enables reading zipped images, as well as reading/writing zip files from FileSystem interfaces
89
120
zip = [" dep:zip" ]
121
+ # tar feature enables reading tar files from FileSystem interfaces
90
122
tar = [" dep:tar" ]
91
- mfi = [" dep:flate2" ]
92
- td0 = [" dep:num-traits" , " dep:num-derive" ]
123
+ # fat feature enables reading FAT12/16/32 filesystems. This will pull in fluxfox_fat dependency
93
124
fat = [" dep:fluxfox_fat" ]
125
+ # flux feature enables reading flux images. This will pull in histogram dependency
126
+ flux = [" dep:histogram" ]
127
+ # plotly feature enables export of flux timings to plotly (perhaps this should not be internal to fluxfox?)
94
128
plot = [" dep:plotly" ]
95
129
130
+ # Disk Image File Format Features
131
+ # ----------------------------------------------------------------------------------------------------------------------
132
+ # mfi feature enables reading MFI images. This will pull in flate2 dependency for compression/decompression
133
+ mfi = [" dep:flate2" , " flux" ]
134
+ # td0 feature enables reading TD0 images. This will pull in num-traits and num-derive dependencies and LZW/LZHUF
135
+ # routines for compression/decompression
136
+ td0 = [" dep:num-traits" , " dep:num-derive" ]
137
+ # adf feature enables reading Amiga ADF images. This does not require an additional format parser, instead it is used to
138
+ # enable reading/writing StandardFormat::Amiga880k images in the `raw` parser and StandardSectorView, as well as
139
+ # advertising the ADF extension.
140
+ adf = []
141
+
142
+ # Clippy lint control
143
+ # ----------------------------------------------------------------------------------------------------------------------
96
144
[lints .clippy ]
145
+ # We will eventually take this advice, but not now
97
146
too-many-arguments = " allow"
147
+ # Sometimes adding + 0 helps line things up. There's no harm in it
98
148
identity_op = " allow"
99
149
150
+ # Build profiles
151
+ # ----------------------------------------------------------------------------------------------------------------------
100
152
[profile .release ]
153
+ # Most aggressive LTO profile
101
154
lto = " thin"
102
155
103
156
[profile .release .package .ff_egui_app ]
104
- opt-level = 2 # fast and small wasm
157
+ # Fast and small wasm
158
+ opt-level = 2
105
159
106
- # Optimize all dependencies even in debug builds:
160
+ # Optimize all dependencies even in debug builds
107
161
[profile .dev .package ."*" ]
108
162
opt-level = 2
109
163
0 commit comments