@@ -8,79 +8,66 @@ rust-version = "1.74"
88build = " build.rs"
99
1010[features ]
11- default = [" linux" ]
12- # Linux/FreeBSD
13- unix = [" std" , " raw_pio" , " smbios" , " dep:nix" , " dep:libc" ]
14- linux = [" unix" , " linux_pio" , " cros_ec_driver" , " hidapi" , " rusb" ]
15- freebsd = [" unix" , " freebsd_pio" , " hidapi" , " rusb" ]
11+ default = [" std" ]
12+ std = [" hidapi" , " rusb" ]
13+
1614# hidapi and rusb don't seem to build in the cross container at the moment
17- cross_freebsd = [" unix" , " freebsd_pio" ]
18- # Windows does not have the cros_ec driver nor raw port I/O access to userspace
19- windows = [" std" , " smbios" , " dep:windows" , " win_driver" , " raw_pio" , " hidapi" , " rusb" , " dep:wmi" ]
20- smbios = [" dep:smbios-lib" ]
21- std = [" dep:clap" , " dep:clap-num" , " dep:clap-verbosity-flag" , " dep:env_logger" , " smbios-lib?/std" ]
15+ cross_freebsd = []
2216rusb = [" dep:rusb" ]
2317hidapi = [" dep:hidapi" ]
2418uefi = [
25- " dep:plain " , " raw_pio " , " smbios " , " lazy_static/spin_no_std" , " dep:uefi " , " dep:uefi-services " ,
19+ " lazy_static/spin_no_std" ,
2620 # Otherwise I get: `LLVM ERROR: Do not know how to split the result of this operator!`
2721 # Seems to be a Ruset/LLVM bug when SSE is enabled.
2822 # See: https://github.com/rust-lang/rust/issues/61721
2923 " sha2/force-soft"
3024]
3125
32- # EC communication via Port I/O on FreeBSD
33- freebsd_pio = [" redox_hwio/std" ]
34- # EC communication via Port I/O on Linux
35- linux_pio = [" dep:libc" , " redox_hwio/std" ]
36- # EC communication via raw Port I/O (e.g. UEFI or other ring 0 code)
37- raw_pio = []
38- # EC communication via cros_ec driver on Linux
39- cros_ec_driver = []
40-
41- # Chromium EC driver by DHowett
42- win_driver = []
43-
4426[build-dependencies ]
4527built = { version = " 0.5" , features = [" chrono" , " git2" ] }
4628
4729[dependencies ]
4830lazy_static = " 1.4.0"
4931sha2 = { version = " 0.10.8" , default-features = false , features = [ " force-soft" ] }
5032regex = { version = " 1.11.1" , default-features = false }
51- redox_hwio = { git = " https://github.com/FrameworkComputer/rust-hwio" , branch = " freebsd" , default-features = false }
52- libc = { version = " 0.2.155" , optional = true }
53- clap = { version = " 4.5" , features = [" derive" , " cargo" ], optional = true }
54- clap-num = { version = " 1.2.0" , optional = true }
55- clap-verbosity-flag = { version = " 2.2.1" , optional = true }
56- nix = { version = " 0.29.0" , features = [" ioctl" , " user" ], optional = true }
5733num = { version = " 0.4" , default-features = false }
5834num-derive = { version = " 0.4" , default-features = false }
5935num-traits = { version = " 0.2" , default-features = false }
60- env_logger = { version = " 0.11" , optional = true }
6136log = { version = " 0.4" , default-features = true }
62- uefi = { version = " 0.20" , features = [" alloc" ], optional = true }
63- uefi-services = { version = " 0.17" , optional = true }
64- plain = { version = " 0.2.3" , optional = true }
65- spin = { version = " 0.9.8" , optional = false }
66- hidapi = { version = " 2.6.3" , optional = true , features = [ " windows-native" ] }
67- rusb = { version = " 0.9.4" , optional = true }
37+ spin = { version = " 0.9.8" }
6838no-std-compat = { version = " 0.4.1" , features = [ " alloc" ] }
6939guid_macros = { path = " ../guid_macros" }
70- wmi = { version = " 0.15.0" , optional = true }
7140
72- [dependencies .smbios-lib ]
73- git = " https://github.com/FrameworkComputer/smbios-lib.git"
74- branch = " no-std"
75- optional = true
76- default-features = false
77- # Local development
78- # path = "../../smbios-lib"
79- # After my changes are upstreamed
80- # version = "0.9.0"
41+ [target .'cfg(target_os = "uefi")' .dependencies ]
42+ uefi = { version = " 0.20" , features = [" alloc" ] }
43+ uefi-services = " 0.17"
44+ plain = " 0.2.3"
45+ redox_hwio = { git = " https://github.com/FrameworkComputer/rust-hwio" , branch = " freebsd" , default-features = false }
46+ smbios-lib = { git = " https://github.com/FrameworkComputer/smbios-lib.git" , branch = " no-std" , default-features = false }
47+
48+ [target .'cfg(windows)' .dependencies ]
49+ wmi = " 0.15.0"
50+ smbios-lib = { git = " https://github.com/FrameworkComputer/smbios-lib.git" , branch = " no-std" }
51+ env_logger = " 0.11"
52+ clap = { version = " 4.5" , features = [" derive" , " cargo" ] }
53+ clap-num = { version = " 1.2.0" }
54+ clap-verbosity-flag = { version = " 2.2.1" }
55+ hidapi = { version = " 2.6.3" , features = [ " windows-native" ] }
56+ rusb = " 0.9.4"
57+
58+ [target .'cfg(unix)' .dependencies ]
59+ libc = " 0.2.155"
60+ nix = { version = " 0.29.0" , features = [" ioctl" , " user" ] }
61+ redox_hwio = { git = " https://github.com/FrameworkComputer/rust-hwio" , branch = " freebsd" }
62+ smbios-lib = { git = " https://github.com/FrameworkComputer/smbios-lib.git" , branch = " no-std" }
63+ env_logger = " 0.11"
64+ clap = { version = " 4.5" , features = [" derive" , " cargo" ] }
65+ clap-num = { version = " 1.2.0" }
66+ clap-verbosity-flag = { version = " 2.2.1" }
67+ hidapi = { version = " 2.6.3" , features = [ " windows-native" ], optional = true }
68+ rusb = { version = " 0.9.4" , optional = true }
8169
82- [dependencies .windows ]
83- optional = true
70+ [target .'cfg(windows)' .dependencies .windows ]
8471version = " 0.59.0"
8572features = [
8673 " Win32_Foundation" ,
0 commit comments