added wasm port

This commit is contained in:
2025-07-08 22:32:58 +08:00
parent fa675c4b7f
commit 325ee25b2e
31 changed files with 1572 additions and 181 deletions

View File

@@ -0,0 +1,20 @@
[build]
target = "wasm32-unknown-unknown"
[target.wasm32-unknown-unknown]
rustflags = [
"-A", "dead_code",
# Import memory from WASM-4
"-C", "link-arg=--import-memory",
"-C", "link-arg=--initial-memory=65536",
"-C", "link-arg=--max-memory=65536",
# "-C", "link-args=--relocatable",
# Reserve 2044 bytes of stack space, offset from 6580.
# Bump this value, 16-byte aligned, if the framebuffer gets corrupted.
"-C", "link-arg=-zstack-size=14752",
# Not working? https://github.com/rust-lang/rust/issues/46645#issuecomment-423912553
# "-C", "link-arg=--global-base=14752",
]