mirror of
https://github.com/imjasonh/nescript
synced 2026-07-08 17:06:04 +00:00
Parser extensions:
- sprite declarations with chr: @chr("file.png"), @binary("file.bin"), or inline [hex]
- palette declarations with colors: [0x0F, 0x00, 0x10, 0x20]
- background declarations with chr: asset source
- @chr/@binary asset source parsing
- load_background and set_palette statements
- --debug CLI flag (plumbed through, not yet wired to codegen)
Asset pipeline (new module):
- PNG → CHR tile conversion using image crate (8x8 tiles, 2-bitplane encoding)
- NES color palette table (all 64 standard NES colors as RGB)
- Nearest-color matching (Euclidean distance in RGB space)
Debug module (new):
- Source map (ROM address → source Span mapping)
- Debug symbols with variable address table
- Mesen-compatible .mlb label export
- .sym symbol table export
192 tests total (13 new: 5 parser + 3 asset + 5 debug)
https://claude.ai/code/session_01W6eQFStA66EuMKHUFo2rx3
44 lines
1.1 KiB
TOML
44 lines
1.1 KiB
TOML
[package]
|
|
name = "nescript"
|
|
version = "0.1.0"
|
|
edition = "2021"
|
|
description = "A statically-typed compiler for NES game development"
|
|
license = "MIT"
|
|
|
|
[dependencies]
|
|
clap = { version = "4", features = ["derive"] }
|
|
ariadne = "0.4"
|
|
image = { version = "0.25", default-features = false, features = ["png"] }
|
|
|
|
[dev-dependencies]
|
|
pretty_assertions = "1"
|
|
|
|
[profile.release]
|
|
lto = true
|
|
strip = true
|
|
|
|
[lints.rust]
|
|
unsafe_code = "forbid"
|
|
|
|
[lints.clippy]
|
|
all = { level = "warn", priority = -1 }
|
|
pedantic = { level = "warn", priority = -1 }
|
|
# Allow patterns common in compiler code
|
|
module_name_repetitions = "allow"
|
|
must_use_candidate = "allow"
|
|
missing_errors_doc = "allow"
|
|
missing_panics_doc = "allow"
|
|
cast_possible_truncation = "allow"
|
|
wildcard_imports = "allow"
|
|
option_if_let_else = "allow"
|
|
match_same_arms = "allow"
|
|
unnested_or_patterns = "allow"
|
|
missing_const_for_fn = "allow"
|
|
too_many_lines = "allow"
|
|
single_match_else = "allow"
|
|
unnecessary_wraps = "allow"
|
|
unused_self = "allow"
|
|
enum_glob_use = "allow"
|
|
manual_assert = "allow"
|
|
vec_init_then_push = "allow"
|
|
struct_field_names = "allow"
|