j-hc / monster-fans-linux Goto Github PK
View Code? Open in Web Editor NEWMonster Laptoplar için Linux Sistemlerde Oto Fan Yönetimi
License: Apache License 2.0
Monster Laptoplar için Linux Sistemlerde Oto Fan Yönetimi
License: Apache License 2.0
~/monster-fans-linux ❯❯❯ sudo cargo build --release master Compiling monster-fans-linux v0.0.0 (/home/furkan/monster-fans-linux) error[E0463]: can't find crate for
std| = note: the
x86_64-unknown-linux-musltarget may not be installed = help: consider downloading the target with
rustup target add x86_64-unknown-linux-musl`
error[E0463]: can't find crate for core
--> src/ec_io.rs:1:5
|
1 | use core::arch::asm;
| ^^^^ can't find crate
|
= note: the x86_64-unknown-linux-musl
target may not be installed
= help: consider downloading the target with rustup target add x86_64-unknown-linux-musl
error[E0463]: can't find crate for std
--> src/ec_io.rs:2:5
|
2 | use std::thread;
| ^^^ can't find crate
|
= note: the x86_64-unknown-linux-musl
target may not be installed
= help: consider downloading the target with rustup target add x86_64-unknown-linux-musl
error[E0463]: can't find crate for std
--> src/main.rs:1:5
|
1 | use std::fs::File;
| ^^^ can't find crate
|
= note: the x86_64-unknown-linux-musl
target may not be installed
= help: consider downloading the target with rustup target add x86_64-unknown-linux-musl
error[E0463]: can't find crate for std
--> src/main.rs:2:5
|
2 | use std::io::{self, Read};
| ^^^ can't find crate
|
= note: the x86_64-unknown-linux-musl
target may not be installed
= help: consider downloading the target with rustup target add x86_64-unknown-linux-musl
error[E0463]: can't find crate for std
--> src/main.rs:3:5
|
3 | use std::process::{self, Command};
| ^^^ can't find crate
|
= note: the x86_64-unknown-linux-musl
target may not be installed
= help: consider downloading the target with rustup target add x86_64-unknown-linux-musl
error[E0463]: can't find crate for std
--> src/main.rs:4:5
|
4 | use std::thread;
| ^^^ can't find crate
|
= note: the x86_64-unknown-linux-musl
target may not be installed
= help: consider downloading the target with rustup target add x86_64-unknown-linux-musl
error[E0463]: can't find crate for std
--> src/main.rs:5:5
|
5 | use std::time::Duration;
| ^^^ can't find crate
|
= note: the x86_64-unknown-linux-musl
target may not be installed
= help: consider downloading the target with rustup target add x86_64-unknown-linux-musl
error: cannot find macro write
in this scope
--> src/main.rs:124:30
|
124 | Mode::Default => write!(f, "default mode"),
| ^^^^^
error: cannot find macro write
in this scope
--> src/main.rs:125:28
|
125 | Mode::Quiet => write!(f, "quiet mode"),
| ^^^^^
error: cannot find macro asm
in this scope
--> src/ec_io.rs:10:5
|
10 | asm!("in al, dx", out("al") value, in("dx") port, options(nomem, nostack, preserves_flags));
| ^^^
error: cannot find macro asm
in this scope
--> src/ec_io.rs:15:5
|
15 | asm!("out dx, al", in("dx") port, in("al") value, options(nomem, nostack, preserves_flags));
| ^^^
error: cannot find macro eprintln
in this scope
--> src/ec_io.rs:79:13
|
79 | eprintln!("err on waiting for the ec io");
| ^^^^^^^^
error: cannot find macro eprintln
in this scope
--> src/main.rs:135:9
|
135 | eprintln!("run with sudo!");
| ^^^^^^^^
error: cannot find macro eprintln
in this scope
--> src/main.rs:147:17
|
147 | eprintln!("Usage:\n{executable_name} {DEFAULT_MODE_ARG}|{QUIET_MODE_ARG}");
| ^^^^^^^^
error: cannot find macro println
in this scope
--> src/main.rs:154:5
|
154 | println!("Running in {}", mode);
| ^^^^^^^
error: cannot find macro println
in this scope
--> src/main.rs:158:5
|
158 | println!(
| ^^^^^^^
error: cannot find macro println
in this scope
--> src/main.rs:171:5
|
171 | println!("initial ec: fan={}%, CPU={}°C", ec.fan_duty, ec.cpu_temp);
| ^^^^^^^
error: cannot find macro eprintln
in this scope
--> src/main.rs:175:13
|
175 | eprintln!("err on reading: '{e}'");
| ^^^^^^^^
error: cannot find macro println
in this scope
--> src/main.rs:181:17
|
181 | println!(
| ^^^^^^^
error: cannot find macro eprintln
in this scope
--> src/main.rs:186:17
|
186 | eprintln!("err on writing to the ec fan duty");
| ^^^^^^^^
error: cannot find macro println
in this scope
--> src/main.rs:196:5
|
196 | println!("Signal received. Waiting for EC, then closing..");
| ^^^^^^^
error[E0433]: failed to resolve: use of undeclared crate or module thread
--> src/ec_io.rs:76:9
|
76 | thread::sleep(std::time::Duration::from_micros(1000));
| ^^^^^^ use of undeclared crate or module thread
error[E0463]: can't find crate for std
--> src/ec_io.rs:76:23
|
76 | thread::sleep(std::time::Duration::from_micros(1000));
| ^^^ can't find crate
|
= note: the x86_64-unknown-linux-musl
target may not be installed
= help: consider downloading the target with rustup target add x86_64-unknown-linux-musl
error[E0433]: failed to resolve: use of undeclared crate or module io
--> src/main.rs:70:43
|
70 | pub fn read_from_kernel(&mut self) -> io::Result<()> {
| ^^ use of undeclared crate or module io
error[E0433]: failed to resolve: use of undeclared type File
--> src/main.rs:71:21
|
71 | let mut f = File::open("/sys/kernel/debug/ec/ec0/io")?;
| ^^^^ use of undeclared type File
error[E0463]: can't find crate for std
--> src/main.rs:95:28
|
95 | let step = std::cmp::min(current_fd - fan, Self::MAX_STEP);
| ^^^ can't find crate
|
= note: the x86_64-unknown-linux-musl
target may not be installed
= help: consider downloading the target with rustup target add x86_64-unknown-linux-musl
error[E0433]: failed to resolve: use of undeclared crate or module io
--> src/main.rs:108:29
|
108 | pub fn load_module() -> io::Result<()> {
| ^^ use of undeclared crate or module io
error[E0433]: failed to resolve: use of undeclared type Command
--> src/main.rs:109:9
|
109 | Command::new("/sbin/modprobe")
| ^^^^^^^ use of undeclared type Command
error[E0463]: can't find crate for std
--> src/main.rs:121:6
|
121 | impl std::fmt::Display for Mode {
| ^^^ can't find crate
|
= note: the x86_64-unknown-linux-musl
target may not be installed
= help: consider downloading the target with rustup target add x86_64-unknown-linux-musl
error[E0463]: can't find crate for std
--> src/main.rs:122:27
|
122 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
| ^^^ can't find crate
|
= note: the x86_64-unknown-linux-musl
target may not be installed
= help: consider downloading the target with rustup target add x86_64-unknown-linux-musl
error[E0463]: can't find crate for std
--> src/main.rs:122:55
|
122 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
| ^^^ can't find crate
|
= note: the x86_64-unknown-linux-musl
target may not be installed
= help: consider downloading the target with rustup target add x86_64-unknown-linux-musl
error[E0433]: failed to resolve: use of undeclared crate or module process
--> src/main.rs:136:9
|
136 | process::exit(1);
| ^^^^^^^ use of undeclared crate or module process
error[E0463]: can't find crate for std
--> src/main.rs:139:20
|
139 | let mut args = std::env::args();
| ^^^ can't find crate
|
= note: the x86_64-unknown-linux-musl
target may not be installed
= help: consider downloading the target with rustup target add x86_64-unknown-linux-musl
error[E0433]: failed to resolve: use of undeclared crate or module process
--> src/main.rs:148:17
|
148 | process::exit(1);
| ^^^^^^^ use of undeclared crate or module process
error[E0433]: failed to resolve: use of undeclared crate or module thread
--> src/main.rs:191:9
|
191 | thread::sleep(Duration::from_secs(2));
| ^^^^^^ use of undeclared crate or module thread
error[E0433]: failed to resolve: use of undeclared type Duration
--> src/main.rs:191:23
|
191 | thread::sleep(Duration::from_secs(2));
| ^^^^^^^^ use of undeclared type Duration
error[E0405]: cannot find trait Fn
in this scope
--> src/main.rs:50:33
|
50 | pub duty_calc_func: &'a dyn Fn(f32) -> f32,
| ^^ not found in this scope
error[E0405]: cannot find trait Fn
in this scope
--> src/main.rs:59:40
|
59 | pub fn new(duty_calc_func: &'a dyn Fn(f32) -> f32) -> Self {
| ^^ not found in this scope
error[E0425]: cannot find function, tuple struct or tuple variant Ok
in this scope
--> src/main.rs:76:9
|
76 | Ok(())
| ^^ not found in this scope
error[E0412]: cannot find type Option
in this scope
--> src/main.rs:79:46
|
79 | pub fn switch_to_next_duty(&mut self) -> Option {
| ^^^^^^ not found in this scope
error[E0425]: cannot find value None
in this scope
--> src/main.rs:90:24
|
90 | return None;
| ^^^^ not found in this scope
error[E0425]: cannot find value None
in this scope
--> src/main.rs:99:24
|
99 | return None;
| ^^^^ not found in this scope
error[E0425]: cannot find function, tuple struct or tuple variant Some
in this scope
--> src/main.rs:102:20
|
102 | return Some(ec_write_fan_duty(next_duty as f32));
| ^^^^ not found in this scope
error[E0425]: cannot find value None
in this scope
--> src/main.rs:105:9
|
105 | None
| ^^^^ not found in this scope
error[E0425]: cannot find function, tuple struct or tuple variant Ok
in this scope
--> src/main.rs:113:9
|
113 | Ok(())
| ^^ not found in this scope
error[E0531]: cannot find tuple struct or tuple variant Some
in this scope
--> src/main.rs:143:9
|
143 | Some(arg) => match arg.as_str() {
| ^^^^ not found in this scope
error[E0531]: cannot find tuple struct or tuple variant Err
in this scope
--> src/main.rs:174:16
|
174 | if let Err(e) = ec.read_from_kernel() {
| ^^^ not found in this scope
error[E0531]: cannot find tuple struct or tuple variant Some
in this scope
--> src/main.rs:179:16
|
179 | if let Some(s) = ec.switch_to_next_duty() {
| ^^^^ not found in this scope
Some errors have detailed explanations: E0405, E0412, E0425, E0433, E0463, E0531.
For more information about an error, try rustc --explain E0405
.
error: could not compile monster-fans-linux
due to 49 previous errors
`
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.