commit f33c18d2b6e672ea1893bae06251390255f15dee Author: Jason Williams Date: Wed Aug 8 23:20:24 2018 +0100 first commit diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000000..53eaa21960 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +/target +**/*.rs.bk diff --git a/.vscode/tasks.json b/.vscode/tasks.json new file mode 100644 index 0000000000..a7ad9ffd15 --- /dev/null +++ b/.vscode/tasks.json @@ -0,0 +1,22 @@ +{ + // See https://go.microsoft.com/fwlink/?LinkId=733558 + // for the documentation about the tasks.json format + "version": "2.0.0", + "tasks": [ + { + "type": "cargo", + "label": "cargo run", + "command": "cargo", + "args": [ + "run" + ], + "problemMatcher": [ + "$rustc" + ], + "group": { + "kind": "build", + "isDefault": true + } + } + ] +} \ No newline at end of file diff --git a/Cargo.lock b/Cargo.lock new file mode 100644 index 0000000000..0c09a9df51 --- /dev/null +++ b/Cargo.lock @@ -0,0 +1,4 @@ +[[package]] +name = "boa" +version = "0.1.0" + diff --git a/Cargo.toml b/Cargo.toml new file mode 100644 index 0000000000..b4c678ed9d --- /dev/null +++ b/Cargo.toml @@ -0,0 +1,10 @@ +[package] +name = "boa" +version = "0.1.0" +authors = ["Jason Williams "] + +[dependencies] + +[[bin]] +name = "js" +path = "src/bin/bin.rs" \ No newline at end of file diff --git a/src/bin/bin.rs b/src/bin/bin.rs new file mode 100644 index 0000000000..5f2dbe7dc1 --- /dev/null +++ b/src/bin/bin.rs @@ -0,0 +1,6 @@ +use std::fs::read_to_string; + +pub fn main() { + let buffer = read_to_string("test.js").unwrap(); + println!("{}", buffer); +} \ No newline at end of file diff --git a/src/main.rs b/src/main.rs new file mode 100644 index 0000000000..4c391509c3 --- /dev/null +++ b/src/main.rs @@ -0,0 +1,4 @@ +fn main() { + println!("Hello, worlddnbkjxnkjx!"); +} + diff --git a/test.js b/test.js new file mode 100644 index 0000000000..e0686e9e23 --- /dev/null +++ b/test.js @@ -0,0 +1 @@ +console.log('hello world from js'); \ No newline at end of file