Skip to content

Commit 6cd13fd

Browse files
committed
first commit
0 parents  commit 6cd13fd

File tree

6 files changed

+34
-0
lines changed

6 files changed

+34
-0
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/target

Cargo.lock

+5
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
[workspace]
2+
members = [
3+
"chapter2"
4+
]

README.md

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# learning-systems-programming-in-rust
2+
3+
「Rust ならわかるシステムプログラミング」

chapter2/Cargo.toml

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
[package]
2+
name = "chapter2"
3+
version = "0.1.0"
4+
authors = ["yytyd <[email protected]>"]
5+
edition = "2018"
6+
7+
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
8+
9+
[dependencies]
10+
11+
[[bin]]
12+
name = "oswriter"
13+
path = "src/main_2_4_1.rs"

chapter2/src/main_2_4_1.rs

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
use std::fs::File;
2+
use std::io::Write;
3+
4+
fn main() -> std::io::Result<()> {
5+
let mut file = File::create("test.txt")?;
6+
file.write(b"os.File example\n")?;
7+
Ok(())
8+
}

0 commit comments

Comments
 (0)