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

Establish a workflow for Libraries #951

Open
greenfox1505 opened this issue Nov 17, 2024 · 1 comment
Open

Establish a workflow for Libraries #951

greenfox1505 opened this issue Nov 17, 2024 · 1 comment
Labels
feature Adds functionality to the library

Comments

@greenfox1505
Copy link

I have a handful of GDExt projects. I would like use these projects as dependencies. Right now, I have to remove the impl ExtensionLibrary from a given project before including it as a dependency. I'd like a way to allow one project to depend on multiple GodotRust GDExt projects without modifying the originals.

@Bromeon Bromeon added the feature Adds functionality to the library label Nov 17, 2024
@aekobear
Copy link
Contributor

aekobear commented Dec 4, 2024

I was able to get a set up like this working on the latest gdext.

  • I have a "helper" library with crate-type = ["cdylib", "lib"] so that it can be added as a dependency.

  • I have a main library with just crate-type = ["cdylib"]

  • Both libraries are set up in the usual way with impl ExtensionLibrary in their source code

  • The main library references the helper like so:

helper_library = { path = "../my_helper" }
  • My godot project only has a main_library.gdextension

That last point is important- if you have a helper_library.gdextension, godot will try to register the same classes twice.

Is it possible that this set up is unsafe?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Adds functionality to the library
Projects
None yet
Development

No branches or pull requests

3 participants