Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Kinoko API #242

Open
wants to merge 18 commits into
base: main
Choose a base branch
from
Open

Kinoko API #242

wants to merge 18 commits into from

Conversation

em-eight
Copy link
Contributor

Since this was brought up lately, and it will be brought up soon again

This PR allows for Kinoko to be used as a library by external programs.

The background is that generally speaking outside programs cannot restrict themselves to mkw's arena-like allocation system, so they cannot link with Kinoko's operator new. Without binary patching hacks, this can only be done by making Kinoko a shared library and building it with clang and some special build flags.

The majority of the changes are brought by making Kinoko is buildable with clang, which has generally stricter C++ standard conformance. For example:

  • sqrt can't be constexpr until c++26
  • operator new cannot be noexcept
  • private unused class members are detectable by clang
  • There are some printf formatting mismatches in the repo

Besides that I also added some getters to kinoko data that are commonly used externally (used by pynoko).

The difficult thing here is obviously clang. Does kinoko try to switch to clang? Maintain buildability in two compilers? Or just not support API directly. Who knows but for the time being I will be maintaining my fork for anyone who needs it

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.

2 participants