-
Notifications
You must be signed in to change notification settings - Fork 0
/
Cargo.toml
47 lines (39 loc) · 1.43 KB
/
Cargo.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
[package]
name = "nand-to-browser"
version = "0.1.0"
edition = "2021"
authors = ["Felix Schoeller <[email protected]>"]
description = "A Nand to Tetris Emulator implementation that can run in the browser"
license-file = "LICENSE"
repository = "https://github.com/Funkschy/nand-to-browser"
[[bin]]
name = "vm"
path = "src/vm.rs"
[[bin]]
name = "cpu"
path = "src/cpu.rs"
# wasm packages must be cdylib
[lib]
crate-type = ["cdylib", "rlib"]
[features]
trace_vm = [] # this will just print information on any executed instruction while running the vm
trace_calls = [] # if this is enabled, calls will be traced even if trace_vm is disabled
desktop = ["sdl2"] # run the application as a desktop app by rendering to an SDL window
default = ["console_error_panic_hook"]
[dependencies]
# dependencies that are always needed
lazy_static = "1.4"
# needed to parse the output format of the test scripts
regex = "1"
# web dependencies
wasm-bindgen = { version = "0.2" }
# make some javascript functions/types accessible from rust
web-sys = { version = "0.3", features = ['ImageData'] }
# logs panics with console.err which is nice for debugging
console_error_panic_hook = { version = "0.1.7", optional = true }
# for the desktop version
sdl2 = { version = "0.35.2", optional = true }
clap = { version = "4.0.17", features = ["cargo"] }
[profile.release]
# optimize for small code size to reduce the download time on first page load
opt-level = "s"