jhugman / uniffi-bindgen-react-native

A uniffi bindings generator for calling Rust from react-native
Other
0 stars 0 forks source link

Combine build and generate commands on the command line. #40

Closed jhugman closed 1 month ago

jhugman commented 1 month ago

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

This PR combines the build step with the generate bindings and generate turbo-module steps.

Instead of:

ubrn build ios --config matrix-sdk.yaml
(cd rust_modules/matrix-rust-sdk && ubrn generate bindings --library target/aarch64-apple-ios/debug/libmatrix_sdk.a --ts-dir ../../src/generated --cpp-dir ../../cpp/generated )
ubrn generate turbo-module --config matrix-sdk.yaml matrix_sdk matrix_sdk_ui matrix_sdk_ffi

Now, we only have to add --and-generate to the build command:

ubrn build ios --config matrix-sdk.yaml --and-generate