Skip to content

Kinoko API#242

Open
em-eight wants to merge 24 commits intovabold:mainfrom
em-eight:api
Open

Kinoko API#242
em-eight wants to merge 24 commits intovabold:mainfrom
em-eight:api

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