-
Notifications
You must be signed in to change notification settings - Fork 230
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
Initialization stubs for the Android megazord #6610
base: main
Are you sure you want to change the base?
Conversation
This seems OK but I wonder if it is the correct approach longer term - eg, imagine a world where these components are in libxul for Android, whereas a different set of components are in libxul for desktop. In this scenario there's not really any such thing as a "megazord" which makes sense to own this. In that world I guess we'd end up with a component dedicated to this initialization and which targets one single "configuration". I'm wondering if we should just do that here? |
Can we have a Megazord for Desktop and one for Android? I think that's not too much code duplication, isn't it? |
I figured in that world the megazords would be the configuration. They change from being the crate that builds the dylib to the libxul dependency that bundles the Rust components. I haven't thought this through deeply at all though, do you forsee any issues here? |
We should maybe try and move away from the term "megazord"? In practice, it just means "the library in which the components ship". For Android,
I'm not quite sure tbh. In oak, the build environment is slightly different from how it's done in app-services. Specifically, each crate is built, then So I guess that while this might work fine, there also seems a risk that it will not - that we will still want this new "megazord config" code in its own crate so it ends up in To put it another way, conceptually this is great, I'm just uncertain how great it will actually be due to build requirements I don't fully understand. TBH, I'm also not too bothered by this, because it just means we need to adjust things for m-c, which is going to be true for many things. |
another thing I don't understand and I'm not sure if we experimented with, but why did we choose to have many megazords, rather than a single megazord with features to select the components? |
I think you're intuition might be right here and we should have have 2 crates: One is responsible for the configuration/initialization logic and the UniFFI bindings and the other is responsible for integrating with the build system. It took me a while to get this gradle code working, which seems like a signal that we might have similar problems is moz-central. |
init component: #6618 |
I started with Jo's work in #6607 and added gradle code so that this actually compiles.
Pull Request checklist
[ci full]
to the PR title.Branch builds: add
[firefox-android: branch-name]
to the PR title.