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

Break up the ubrn command line build commands #71

Merged
merged 4 commits into from
Aug 18, 2024

Conversation

jhugman
Copy link
Owner

@jhugman jhugman commented Aug 17, 2024

According to The Big O of Code Reviews, this is a O(n) change.

This adds a number of suppression flags to the command line. This is to make it:

  • easier to generate code using your own build process
  • easier to customize parts of the build process
  • cache as much as possible of the previous build

For build ios:

  • --no-xcodebuild suppress the creation of an xcframework. The xcframework is expected, but with this flag, you are expected to provide it; perhaps after generating swift from a library file. (future work idea: add an arg to generate Swift from uniffi).
  • --no-cargo detects if any targets are already built, and uses that to generate library files. If no targets are built, then build all, re-using the library files next time.

For build android

  • --no-jniLibs, this is Android reflection of --no-xcodebuild. I'm not sure what this would be used for.
  • --no-cargo detects if any targets are already built, and uses that to generate library files. If no targets are built, then build all, re-using the library files next time.

A new command: generate all --config config.yaml lib.a:

  • This combines generate bindings and generate turbo-module into a higher level command which accepts a config file and a pre-built library file.

Copy link
Collaborator

@zzorba zzorba left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, appreciate the increased granularity here.

@jhugman jhugman merged commit 90c9e92 into main Aug 18, 2024
1 check passed
@jhugman jhugman deleted the jhugman/ubrn-cli-breakup-build-process branch August 18, 2024 18:15
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

Successfully merging this pull request may close these issues.

2 participants