chip8-rust / chip8-ui

CHIP-8 graphical emulator built with the Rust programing language
MIT License
8 stars 0 forks source link

Split GUI from emulator #3

Closed robo9k closed 9 years ago

robo9k commented 9 years ago

Most of the recent breakage due to rustc updates (#1, #2) affects the Piston part of the crate.

Maybe it could be worthwhile to split the current code in a chip8-piston (GUI) and a chip8 (emulator) crate. This would allow (others) to write other GUIs (e.g. with gchp/rustbox and such) using the same backend. Ideally both crates would be published on crates.io.

You could keep the code for both crates in the same Git repository using simple subfolders. You could move the -emulator to a separate repository and use it in -piston as a Git submodule. Or you could have the code in two repositories and rely on Cargo to fetch the -emulator.

I'd like to try moving the emulator code in a subfolder and publishing it on crates.io (adding you as a crate owner), using chip8 as the crate name. This way it should be possible for me to have all the changes in one (probably rather large) pull request and you'd also be in control of the crate on crates.io (to push updates or remove me as an owner).

Along the way one might add CI via Travis and rustdoc via GitHub Pages (I did that for my own little Rust project), but that's another story.

All in all that's just a suggestion and if you don't feel like you want to participate in the adventure, I'll try to come up with another crate name for the emulator part and keep it in a fork, naming you as the primary author :smiley:

("You" is referring to @jakerr in case it's not entirely clear :confused: )

jakerr commented 9 years ago

Thanks for the suggestion! I've been wanting to do something like this. Yeah let's do it!

In principal I like the idea of splitting into submodules but not sure I want to deal with the overhead for this (currently) tiny project, so I'd also prefer to go the two-crates-in-one-repo approach for now. I've not used crates.io yet and am quite interested in learning the ropes so this will be a welcome education for me too! :)

If you want to get started on the subdirectory move that would be great. Thanks again for the offer!

On naming:

The grapevine says we might be loosing dashes for underscores for all crates.io packages. Let's just adopt that now :)

I've heard people argue that Chip-8 shouldn't be called an emulator as it was never a hardware system to begin with. Maybe we should name the library bit chip8_vm and the UI chip8_piston or chip8_ui. Personally I like chip8_ui better for the our officially maintained UI.

robo9k commented 9 years ago

I've started a new split-ui-vm branch in my fork, where you can compare the current progress via GitHub's UI (or at least that's working for me when logged in). This branch will eventually become the basis for the final pull request.

I'm trying to do everything step-by-step, adding explainations to the commit messages. The project might not work/build in-between, so hold your horses for now :wink:

jakerr commented 9 years ago

Thanks!