AlexAltea / unicorn.js

Unicorn CPU emulator framework port for JavaScript
https://alexaltea.github.io/unicorn.js/
GNU General Public License v2.0
566 stars 36 forks source link

Add documentation #31

Closed qwergle closed 2 years ago

qwergle commented 2 years ago

So, this seems really promising. However, like Unicorn, it has absolutely no documentation (at least in English, but it has documentation in Chinese), so you have to dig through the project's source code to find information. So, I suggest that some documentation be added. There's already a wiki, so why not use it (currently, it just redirects to the repo's main page)? I'd love to help.

AlexAltea commented 2 years ago

Unicorn.js are just bindings for Unicorn, and the API has not changed significantly. As you pointed out Unicorn does not have separate English documentation, but I personally find the comments in their main header enough: https://github.com/unicorn-engine/unicorn/blob/master/include/unicorn/unicorn.h

The wrapper that you see at https://github.com/AlexAltea/unicorn.js/blob/master/src/unicorn-wrapper.js follows a similar name convention, but it lacks comments.

There's already a wiki, so why not use it (currently, it just redirects to the repo's main page)?

It was empty and I have just removed it. I think that feature is a misuse of Git: documentation should always be part of the repository itself, not a separate GitHub-specific system.

I have just created a blank docs/api.md file. Anything worth mentioning can be added there via pull requests. I'd be happy to do so, but I currently don't have the time.

qwergle commented 2 years ago

Ok!