From d470a66eaea8f2894c59928791e05239c33d91eb Mon Sep 17 00:00:00 2001 From: James Hugman Date: Mon, 30 Sep 2024 16:13:51 +0100 Subject: [PATCH] Miscellaneous feature/bugfixes --- crates/ubrn_cli/src/codegen/mod.rs | 2 ++ crates/ubrn_cli/src/codegen/templates/TurboModuleTemplate.cpp | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/crates/ubrn_cli/src/codegen/mod.rs b/crates/ubrn_cli/src/codegen/mod.rs index a1ed40f4..beee0dd4 100644 --- a/crates/ubrn_cli/src/codegen/mod.rs +++ b/crates/ubrn_cli/src/codegen/mod.rs @@ -64,6 +64,8 @@ impl TemplateConfig { rust_crate: CrateMetadata, modules: Vec, ) -> Self { + let mut modules = modules; + modules.sort_by_key(|m| m.ts()); Self { project, rust_crate, diff --git a/crates/ubrn_cli/src/codegen/templates/TurboModuleTemplate.cpp b/crates/ubrn_cli/src/codegen/templates/TurboModuleTemplate.cpp index 8f46c267..341e0a7f 100644 --- a/crates/ubrn_cli/src/codegen/templates/TurboModuleTemplate.cpp +++ b/crates/ubrn_cli/src/codegen/templates/TurboModuleTemplate.cpp @@ -14,7 +14,7 @@ namespace {{ self.config.project.cpp_namespace() }} { {%- for m in self.config.modules %} {{ m.cpp_module() }}::registerModule(runtime, callInvoker); {%- endfor %} - return false; + return true; } uint8_t cleanupRustCrate(jsi::Runtime &runtime) {