added alternatives for windows cputemp detection
This commit is contained in:
23
WatcherAgent/src/library.rs
Normal file
23
WatcherAgent/src/library.rs
Normal file
@@ -0,0 +1,23 @@
|
||||
/*
|
||||
$ rustc --crate-type=lib rary.rs
|
||||
$ ls lib*
|
||||
library.rlib
|
||||
|
||||
// extern crate rary; // May be required for Rust 2015 edition or earlier
|
||||
|
||||
fn main() {
|
||||
rary::public_function();
|
||||
|
||||
// Error! `private_function` is private
|
||||
//rary::private_function();
|
||||
|
||||
rary::indirect_access();
|
||||
}
|
||||
|
||||
# Where library.rlib is the path to the compiled library, assumed that it's
|
||||
# in the same directory here:
|
||||
$ rustc executable.rs --extern rary=library.rlib && ./executable
|
||||
called rary's `public_function()`
|
||||
called rary's `indirect_access()`, that
|
||||
> called rary's `private_function()`
|
||||
*/
|
Reference in New Issue
Block a user