Browse Source

first commit

pull/1/head
Jason Williams 6 years ago
commit
f33c18d2b6
  1. 2
      .gitignore
  2. 22
      .vscode/tasks.json
  3. 4
      Cargo.lock
  4. 10
      Cargo.toml
  5. 6
      src/bin/bin.rs
  6. 4
      src/main.rs
  7. 1
      test.js

2
.gitignore vendored

@ -0,0 +1,2 @@
/target
**/*.rs.bk

22
.vscode/tasks.json vendored

@ -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
}
}
]
}

4
Cargo.lock generated

@ -0,0 +1,4 @@
[[package]]
name = "boa"
version = "0.1.0"

10
Cargo.toml

@ -0,0 +1,10 @@
[package]
name = "boa"
version = "0.1.0"
authors = ["Jason Williams <jase.williams@gmail.com>"]
[dependencies]
[[bin]]
name = "js"
path = "src/bin/bin.rs"

6
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);
}

4
src/main.rs

@ -0,0 +1,4 @@
fn main() {
println!("Hello, worlddnbkjxnkjx!");
}

1
test.js

@ -0,0 +1 @@
console.log('hello world from js');
Loading…
Cancel
Save