Initial commit

This commit is contained in:
pjht 2024-09-16 12:29:52 -05:00
commit feac63c100
Signed by: pjht
GPG Key ID: 7B5F6AFBEC7EE78E
6 changed files with 33 additions and 0 deletions

5
.cargo/config.toml Normal file
View File

@ -0,0 +1,5 @@
[build]
target = "x86_64-unknown-mikros"
[install]
root = "../os_build/sysroot"

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
/target

7
Cargo.lock generated Normal file
View File

@ -0,0 +1,7 @@
# This file is automatically @generated by Cargo.
# It is not intended for manual editing.
version = 3
[[package]]
name = "pts_tester"
version = "0.1.0"

6
Cargo.toml Normal file
View File

@ -0,0 +1,6 @@
[package]
name = "pts_tester"
version = "0.1.0"
edition = "2021"
[dependencies]

2
rust-toolchain.toml Normal file
View File

@ -0,0 +1,2 @@
[toolchain]
channel = "dev-x86_64-unknown-mikros"

12
src/main.rs Normal file
View File

@ -0,0 +1,12 @@
use std::{fs::File, io::{BufRead, BufReader}};
use std::io::Write;
fn main() {
let pts_read = File::open("/dev/pts0").unwrap();
let mut pts_write = File::open("/dev/pts0").unwrap();
for line in BufReader::new(pts_read).lines() {
let line = line.unwrap();
writeln!(pts_write, "Got line on PTS: {:?}", line).unwrap();
}
}