Skip to content

Add java wrapper #218

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

Merged
merged 5 commits into from
Apr 16, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -153,11 +153,10 @@ jobs:
if: matrix.config.os == 'macos'
run: |
brew update
# TODO annotate with lld@19, after that is accepted, we don't want to use lld@20 without manually updating it !
brew install llvm@19 lld
echo "$(brew --prefix)/opt/llvm/bin" >> $GITHUB_PATH
echo "LDFLAGS=-L$(brew --prefix)/opt/llvm/lib -L$(brew --prefix)/opt/llvm/lib/c++ -Wl,-rpath,$(brew --prefix)/opt/llvm/lib/c++" >> "$GITHUB_ENV"
echo "CPPFLAGS=-I$(brew --prefix)/opt/llvm/include" >> "$GITHUB_ENV"
brew install llvm@19 lld@19
echo "$(brew --prefix)/opt/llvm@19/bin:$(brew --prefix)/opt/lld@19/bin" >> $GITHUB_PATH
echo "LDFLAGS=-L$(brew --prefix)/opt/llvm@19/lib -L$(brew --prefix)/opt/llvm@19/lib/c++ -Wl,-rpath,$(brew --prefix)/opt/llvm@19/lib/c++ -L$(brew --prefix)/opt/lld@19/lib" >> "$GITHUB_ENV"
echo "CPPFLAGS=-I$(brew --prefix)/opt/llvm@19/include -I$(brew --prefix)/opt/lld@19/include" >> "$GITHUB_ENV"
echo "CC=clang" >> "$GITHUB_ENV"
echo "CXX=clang++" >> "$GITHUB_ENV"
echo "OBJC=clang" >> "$GITHUB_ENV"
Expand Down
6 changes: 6 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,9 @@
path = wrapper/python
url = https://github.com/Totto16/oopetris_wrapper_python.git
ignore = dirty
[submodule "wrapper/java"]
path = wrapper/java
url = https://github.com/Totto16/oopetris_wrapper_java.git
ignore = dirty


22 changes: 19 additions & 3 deletions wrapper/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,29 +2,45 @@

## What is this

This are wrappers of some OOPetris functionaility in other languages.
These are wrappers of some OOPetris functionaility in other languages.
They are all in submodules alias in a seperate git repo.

They currently wrap this:

- OOPetris Recordings

Planned:

- OOPetris AI support

## Languages


Current:

- Node.js (C++ binding)
- C (C++ binding)
- Haskell (C binding)
- Python (C++ binding)
- Java (C++ binding)

Planned:

- Lua
- Java
- Rust

## OS Comaptibility table

| Language | Linux | Windows | macOS |
| :------: | :---: | :-----: | :---: |
| JS | ✅ | ✅ | ✅ |
| C | ✅ | ✅ | ✅ |
| Haskell | ✅ | ✅ | ❌[^1] |
| Python | ✅ | ✅ | ⚠️[^2] |
| Java | ✅ | ✅ | ✅ |

[^1]: A needed dependency doesn't yet compile on macOS
[^2]: Arm64 has some errors, that are related to the toolchain (pybind11)

## Other

For more information on how to get / build those, refer to the subfolders of the languages
1 change: 1 addition & 0 deletions wrapper/java
Submodule java added at 209d69
Loading