forked from wjakob/nanobind
-
Notifications
You must be signed in to change notification settings - Fork 1
Make nanobind work well in rev.ng #1
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
Open
mrjackv
wants to merge
9
commits into
revng:master
Choose a base branch
from
mrjackv:feature/nanobind
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
80caec2
to
ac56f7b
Compare
d4bf98f
to
9248a2d
Compare
Add an additional `CMakeLists.txt` file which allows building nanobind as a standalone project, installing `libnanobind.so` under `/lib` and headers under `/include`.
Drop the use of `typeid` and `std::type_info` from the codebase, they are now replaced with a thin shim through `shimTypeid<T>` and `shim::type_info`.
Search and replace all uses of uses of `std::type_info` and `typeid(...)` from the codebase and replace them with the shimmed functions/classes implemented in the previous commit. This commit can be regenerated during a rebase by running the following command: ``` find src include -type f \ \( -name '*.h' -or -name '*.cpp' \) \ -exec sed -i \ -e 's;std::type_info;shim::type_info;g' \ -e 's;typeid(\*ptr);typeidShim(*ptr);g' \ -e 's;typeid(\([^)]\+\));typeidShim<\1>();g' {} \; ```
c93ef27
to
f1b1a59
Compare
361092a
to
7f4d1fb
Compare
Drop the use of exceptions from the codebase. Where needed add an `abort`.
Search and replace all exception-related code (`try`, `catch`, `throw`) and replace their use with functions/classes implemented in the previous commit. This commit can be regenerated during a rebase by running the following command: ``` find src include -type f \ \( -name '*.h' -or -name '*.cpp' \) \ -exec sed -i \ -e 's|try {|if (true) {|g' \ -e 's|catch (.*&\s*\(.\+\)) {|if (false) { shim::exception_placeholder \1;|g' \ -e 's|catch (.*) {|if (false) {|g' \ -e 's|throw \(.*\);$|throwShim(\1);|g' {} \; ```
Add extra compiler flags that make the compiler stricter.
Remove the `hidden` attribute from the nanobind namespace, as it was causing linking problems.
7f4d1fb
to
9105997
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.