Hello Rust!
This commit is contained in:
parent
46f44cd6ee
commit
11808f323d
30 changed files with 54 additions and 0 deletions
7
hello_world/Cargo.lock
generated
Normal file
7
hello_world/Cargo.lock
generated
Normal file
|
@ -0,0 +1,7 @@
|
|||
# This file is automatically @generated by Cargo.
|
||||
# It is not intended for manual editing.
|
||||
version = 3
|
||||
|
||||
[[package]]
|
||||
name = "hello_world"
|
||||
version = "0.1.0"
|
8
hello_world/Cargo.toml
Normal file
8
hello_world/Cargo.toml
Normal file
|
@ -0,0 +1,8 @@
|
|||
[package]
|
||||
name = "hello_world"
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
[dependencies]
|
BIN
hello_world/src/.main.rs.swp
Normal file
BIN
hello_world/src/.main.rs.swp
Normal file
Binary file not shown.
26
hello_world/src/main.rs
Normal file
26
hello_world/src/main.rs
Normal file
|
@ -0,0 +1,26 @@
|
|||
//!Fichier principal.
|
||||
///Fonction pricipale.
|
||||
fn main()
|
||||
{
|
||||
println!("Hello, world!");
|
||||
let x = 5 + 90 + 5;
|
||||
println!("Is `x` 10 or 100?\nx = {}", x);
|
||||
println!("{} of {:b} people know binary, the other half doesn't", 1, 2);
|
||||
println!("My name is {0}, {1} {0}.", "Bond", "James");
|
||||
///Un complexe.
|
||||
#[derive(Debug)]
|
||||
struct Complex
|
||||
{
|
||||
real: f64,
|
||||
image: f64
|
||||
}
|
||||
impl std::fmt::Display for Complex
|
||||
{
|
||||
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result
|
||||
{
|
||||
write!(f, "{0} + {1}i", self.real, self.image)
|
||||
}
|
||||
}
|
||||
println!("Display: {0}", Complex{real: 3.3, image: 7.2});
|
||||
println!("Debug: {:?}", Complex{real: 3.3, image: 7.2});
|
||||
}
|
1
hello_world/target/.rustc_info.json
Normal file
1
hello_world/target/.rustc_info.json
Normal file
|
@ -0,0 +1 @@
|
|||
{"rustc_fingerprint":6516354288763731336,"outputs":{"17598535894874457435":{"success":true,"status":"","code":0,"stdout":"rustc 1.56.0 (09c42c458 2021-10-18)\nbinary: rustc\ncommit-hash: 09c42c45858d5f3aedfa670698275303a3d19afa\ncommit-date: 2021-10-18\nhost: x86_64-unknown-linux-gnu\nrelease: 1.56.0\nLLVM version: 13.0.0\n","stderr":""},"2797684049618456168":{"success":false,"status":"exit status: 1","code":1,"stdout":"","stderr":"error: `-Csplit-debuginfo` is unstable on this platform\n\n"},"931469667778813386":{"success":true,"status":"","code":0,"stdout":"___\nlib___.rlib\nlib___.so\nlib___.so\nlib___.a\nlib___.so\n/home/fh/.rustup/toolchains/stable-x86_64-unknown-linux-gnu\ndebug_assertions\nproc_macro\ntarget_arch=\"x86_64\"\ntarget_endian=\"little\"\ntarget_env=\"gnu\"\ntarget_family=\"unix\"\ntarget_feature=\"fxsr\"\ntarget_feature=\"sse\"\ntarget_feature=\"sse2\"\ntarget_os=\"linux\"\ntarget_pointer_width=\"64\"\ntarget_vendor=\"unknown\"\nunix\n","stderr":""},"15537503139010883884":{"success":true,"status":"","code":0,"stdout":"___\nlib___.rlib\nlib___.so\nlib___.so\nlib___.a\nlib___.so\n","stderr":""}},"successes":{}}
|
3
hello_world/target/CACHEDIR.TAG
Normal file
3
hello_world/target/CACHEDIR.TAG
Normal file
|
@ -0,0 +1,3 @@
|
|||
Signature: 8a477f597d28d172789f06886806bc55
|
||||
# This file is a cache directory tag created by cargo.
|
||||
# For information about cache directory tags see https://bford.info/cachedir/
|
0
hello_world/target/debug/.cargo-lock
Normal file
0
hello_world/target/debug/.cargo-lock
Normal file
|
@ -0,0 +1 @@
|
|||
fb97a24f3536a015
|
|
@ -0,0 +1 @@
|
|||
{"rustc":9905615409658916977,"features":"[]","target":6051735750501971553,"profile":9251013656241001069,"path":1036222786711178230,"deps":[],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/hello_world-57f66fa325618faf/dep-bin-hello_world"}}],"rustflags":[],"metadata":7797948686568424061,"config":2202906307356721367,"compile_kind":0}
|
Binary file not shown.
|
@ -0,0 +1 @@
|
|||
This file has an mtime of when this was started.
|
BIN
hello_world/target/debug/deps/hello_world-57f66fa325618faf
Executable file
BIN
hello_world/target/debug/deps/hello_world-57f66fa325618faf
Executable file
Binary file not shown.
|
@ -0,0 +1,5 @@
|
|||
/home/fh/Git/Alnotz/Bazar/hello_world/target/debug/deps/hello_world-57f66fa325618faf: src/main.rs
|
||||
|
||||
/home/fh/Git/Alnotz/Bazar/hello_world/target/debug/deps/hello_world-57f66fa325618faf.d: src/main.rs
|
||||
|
||||
src/main.rs:
|
BIN
hello_world/target/debug/hello_world
Executable file
BIN
hello_world/target/debug/hello_world
Executable file
Binary file not shown.
1
hello_world/target/debug/hello_world.d
Normal file
1
hello_world/target/debug/hello_world.d
Normal file
|
@ -0,0 +1 @@
|
|||
/home/fh/Git/Alnotz/Bazar/hello_world/target/debug/hello_world: /home/fh/Git/Alnotz/Bazar/hello_world/src/main.rs
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Reference in a new issue