From f33c18d2b6e672ea1893bae06251390255f15dee Mon Sep 17 00:00:00 2001 From: Jason Williams Date: Wed, 8 Aug 2018 23:20:24 +0100 Subject: [PATCH] first commit --- .gitignore | 2 ++ .vscode/tasks.json | 22 ++++++++++++++++++++++ Cargo.lock | 4 ++++ Cargo.toml | 10 ++++++++++ src/bin/bin.rs | 6 ++++++ src/main.rs | 4 ++++ test.js | 1 + 7 files changed, 49 insertions(+) create mode 100644 .gitignore create mode 100644 .vscode/tasks.json create mode 100644 Cargo.lock create mode 100644 Cargo.toml create mode 100644 src/bin/bin.rs create mode 100644 src/main.rs create mode 100644 test.js 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