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

TeaVM support in third-party extensions #106

Open
czyzby opened this issue Dec 2, 2022 · 5 comments
Open

TeaVM support in third-party extensions #106

czyzby opened this issue Dec 2, 2022 · 5 comments

Comments

@czyzby
Copy link
Contributor

czyzby commented Dec 2, 2022

TeaVM backend should be mostly able to compile pure Java libraries that are specifically made for GWT as long as no native code is involved. As an example, it is able to use the GWT Box2D plugin due to its pure Java implementation.

Ideally, all libraries that currently support GWT via additional dependencies should be tested whether they can be compiled by the TeaVM backend and if they require any GWT-specific artifacts. For example, Artemis-odb provides a GWT library that should be checked against the TeaVM compiler.

@tommyettinger @xpenatan

@tommyettinger
Copy link
Member

I'm not especially familiar with how TeaVM works, but most of the times I need GWT-specific code, I use its super-source feature to replace one implementation with a GWT-specific one, which happens automatically based on the .gwt.xml file configuration. It's entirely possible this isn't needed on TeaVM. Do we need :sources dependencies for TeaVM like GWT needs?

@xpenatan
Copy link
Contributor

xpenatan commented Dec 3, 2022

Hey, about ":sources". I guess no. teavm just need the compiled classes.

@czyzby
Copy link
Contributor Author

czyzby commented Dec 3, 2022

I mostly meant modules that have separate artifacts for GWT. Artemis is a good example, since it includes net.onedaybeard.artemis:artemis-odb in core and net.onedaybeard.artemis:artemis-odb-gwt in GWT. To fully support third-party extensions in the TeaVM backend, such libraries have to be checked if they compile in TeaVM and if the GWT-specific dependencies are necessary to run them.

Now that I think about it, it would be cool if each library defined the platforms that it supports, so you could display warnings whenever one of your platforms cannot use a specific dependency. But it's even more work to provide that info for all existing stuff. ;')

@czyzby
Copy link
Contributor Author

czyzby commented Dec 3, 2022

@xpenatan Do you have a list of libraries that you've already tested against TeaVM? I already included dependencies for FreeType, Bullet and Box2D.

@xpenatan
Copy link
Contributor

xpenatan commented Dec 3, 2022

gdx gltf works with teavm. There is just a issue now with the new snapshots related to /classes and teavm-native classpath that I'm trying to resolve.

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

No branches or pull requests

3 participants