Skip to content

reorganize libmwemu/src into logical module groups#164

Merged
sha0coder merged 2 commits intosha0coder:mainfrom
brandonros:reach2
Apr 5, 2026
Merged

reorganize libmwemu/src into logical module groups#164
sha0coder merged 2 commits intosha0coder:mainfrom
brandonros:reach2

Conversation

@brandonros
Copy link
Copy Markdown
Contributor

closes #163

brandonros and others added 2 commits April 5, 2026 11:53
Group ~20 top-level files and ~16 subdirectories into 7 parent modules:

- arch/: Arch enum + x86/ (regs, flags, FPU, eflags, context) + aarch64/ (regs)
- loaders/: binary format parsers — elf/, macho/, pe/
- threading/: scheduler, thread context, crit_state, global_locks
- exception/: SEH/VEH/UEF handlers, exception types
- windows/: peb/, structures/, kuser_shared, constants
- debug/: console, script, GDB server, breakpoints, tracing, definitions
- utils/: macros, ANSI colors, helper utilities

Also:
- Move banzai.rs into api/ (tracks unimplemented API param counts)
- Move emu_context.rs into emu/ (thread-local emu access)
- Add CLAUDE.md with Apple Silicon cross-compile gotcha and module layout
- Fix unused import warnings and unreachable pattern in libsystem.rs
- Preserve backward-compatible re-exports in lib.rs for external crates

All 250+ constants.rs references updated to windows::constants path.
lib.rs re-exports (regs64, eflags, flags, fpu, winapi, etc.) maintained
for mwemu, pymwemu, and mwemu-test compatibility.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The x86_64 emulator produces incorrect results when compiled natively
for aarch64. Auto-detect Apple Silicon in the Makefile and pass
--target x86_64-apple-darwin to all cargo commands. Add the
corresponding rustup target to CI for macOS ARM runners. Clean up
stale commented-out CI steps.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@brandonros brandonros changed the title https://github.com/sha0coder/mwemu/issues/163 reorganize libmwemu/src into logical module groups Apr 5, 2026
@sha0coder sha0coder merged commit 132c48b into sha0coder:main Apr 5, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

improve logical grouping organization of files

2 participants