Skip to content

Commit adc0032

Browse files
Initial commit
0 parents  commit adc0032

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+1238
-0
lines changed

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
/target/
2+
**/*.rs.bk

.vscode/launch.json

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
// Use IntelliSense to learn about possible attributes.
3+
// Hover to view descriptions of existing attributes.
4+
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5+
"version": "0.2.0",
6+
"configurations": [
7+
8+
{
9+
"name": "Debug",
10+
"type": "gdb",
11+
"request": "launch",
12+
"target": "target/debug/hello-rust",
13+
"cwd": "${workspaceRoot}"
14+
}
15+
]
16+
}

.vscode/tasks.json

+71
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
{
2+
"version": "0.1.0",
3+
"command": "cargo",
4+
"isShellCommand": true,
5+
"tasks": [
6+
{
7+
"taskName": "build",
8+
"isBuildCommand": true,
9+
"showOutput": "always",
10+
"problemMatcher": {
11+
"owner": "rust",
12+
"fileLocation": [
13+
"relative",
14+
"${workspaceRoot}"
15+
],
16+
"pattern": {
17+
"regexp": "^(.*):(\\d+):(\\d+):\\s+(\\d+):(\\d+)\\s+(warning|error):\\s+(.*)$",
18+
"file": 1,
19+
"line": 2,
20+
"column": 3,
21+
"endLine": 4,
22+
"endColumn": 5,
23+
"severity": 6,
24+
"message": 7
25+
}
26+
}
27+
},
28+
{
29+
"taskName": "clean",
30+
"showOutput": "always"
31+
},
32+
{
33+
"taskName": "test",
34+
"showOutput": "always",
35+
"isTestCommand": true,
36+
"problemMatcher": [
37+
{
38+
"owner": "rust",
39+
"fileLocation": [
40+
"relative",
41+
"${workspaceRoot}"
42+
],
43+
"pattern": {
44+
"regexp": "^(.*):(\\d+):(\\d+):\\s+(\\d+):(\\d+)\\s+(warning|error):\\s+(.*)$",
45+
"file": 1,
46+
"line": 2,
47+
"column": 3,
48+
"endLine": 4,
49+
"endColumn": 5,
50+
"severity": 6,
51+
"message": 7
52+
}
53+
},
54+
{
55+
"owner": "rust",
56+
"fileLocation": [
57+
"relative",
58+
"${workspaceRoot}"
59+
],
60+
"severity": "error",
61+
"pattern": {
62+
"regexp": "^.*panicked\\s+at\\s+'(.*)',\\s+(.*):(\\d+)$",
63+
"message": 1,
64+
"file": 2,
65+
"line": 3
66+
}
67+
}
68+
]
69+
}
70+
]
71+
}

Cargo.lock

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

Cargo.toml

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
[package]
2+
name = "hello-rust"
3+
version = "0.1.0"
4+
authors = ["Colin Eberhardt <[email protected]>"]
5+

README.md

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# A WebAssembly CHIP-8 Emulator
2+
3+
A CHIP-8 emulator written in Rust and compiled to WebAssembly. Just for the fun of it!
4+
5+
## Building
6+
7+
This project uses the relatively new `wasm32-unknown-unknown` target, which can be enabled as per the [setup instructions](https://www.hellorust.com/setup/wasm-target/). Once installed simply run the `build` scripte.

build

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#!/bin/sh
2+
rustc +nightly --target wasm32-unknown-unknown -O --crate-type=cdylib src/lib.rs -o web/chip8.wasm
3+

0 commit comments

Comments
 (0)