Marc Rousavy
89a5995dd9
fix: Explicitly check against NDEBUG on Android
2024-09-17 15:14:58 +02:00
Marc Rousavy and GitHub
03e1a716cf
fix: Fix NITRO_DEBUG debug/release preprocessor directive ( #132 )
...
* fix: Use `NITRO_DEBUG` flag to predictably run debug/release code
* feat: Add `NitroModules.buildType`
* fix: Style `debug` label
2024-09-16 16:18:05 +02:00
Marc Rousavy and GitHub
661bea4cec
feat: Add dispose() to HybridObject (and registerRawHybridMethod(...)) ( #82 )
...
* fix: Fix `SwiftClosure` not reading `void*` properly - use `Unmanaged<T>` again
* feat: Add a `dispose()` method to `HybridObject`
* feat: Split `registerRawHybridMethod` out of `registerHybridMethod`
* fix: Throw better error for when `NativeState` is nullptr
* Better debug info
* `FunctionType` -> `FunctionKind`
* fix: Either dynamically get name, or statically through typeinfo.
2024-08-29 16:51:11 +02:00
Marc Rousavy and GitHub
e7b9f412eb
fix: Rewrite Logger to use platform NSLog / __android_log_print ( #54 )
...
* fix: Fix wrong include..?
* fix: Reimplement NitroLogger as a platform-specific logger
* fix: Copy args, and use proper tag
* fix: Fix sprintf crash because of wrong format argument
* fix: Fix Logger usage on iOS
2024-08-20 16:20:44 +02:00
Marc Rousavy
f4ef4b7665
fix: Fix raw JSI functions and add test to example module
2024-08-20 12:13:55 +02:00
Marc Rousavy and GitHub
065736dc2e
feat: Base for Kotlin modules ( #45 )
...
* feat: Base for Kotlin modules
* fix: Properly make sure Nitro C++ is initialized
* Update JNIOnLoad.java
* feat: Set up `initHybrid()` in JHybridObject
* chore: Fix a bunch of linter issues
* fix: Fix fbjni codegen
* Update JHybridObject.hpp
* fix: Make `initHybrid()` JVM static
* feat: Make `mHybridData` private member of each in inheritance chain
* Generate specs
* feat: Set up proper inheritance graph in FBJNI using virtual inheritance `HybridObject` (#46 )
* feat: Try to set up proper inheritance in FBJNI
* Virtual inheritance
* Update JHybridImageFactorySpec.cpp
* It works...
* feat: Virtual base
* Update HybridTestObject.hpp
* Update CMakeLists.txt
* Update JHybridObject.hpp
* Virtual dtor
* Dynamic cast to NativeState 🤔
* Virtual proper
* feat: Generate as virtual base?
* chore: Change to `updateNative`
* feat: Cannot default-construct HybridObject
* fix: Use `dynamic` pointer cast for `HybridContext` because `HybridObject` is now a virtual base
* Update README.md
2024-08-19 12:40:44 +02:00
Marc Rousavy and GitHub
0dd63227d8
fix: Fix Swift umbrella header includes ( #19 )
...
* feat: Try bridge more Swift
* Make all Promises `async` in swift
* Rename `Promise` to `JSPromise`
* Update JSPromise.hpp
* Update JSICache.cpp
* fix import
* fix: Init props
* fix: Remove AnyMap and ArrayBuffer apis for now
* fix import
* no more async? idk
* feat: Convert `std::optional<T>` to `swift::Optional<T>`
* Remove all funcs except hello
* fix: Generate Swift Umbrella header
* fix: Organize
* fix: Hardcode forward-decl
* feat: Properly generate umbrella header from known types
* fix: Fix indentation
* order
* feat: Try bridging some primitives over...
* Update NitroDefines.hpp
* Update Property.ts
* fallthrough looks better
* better error
* fix: Fix wrong enum `maxLength`
* feat: Try `CarSwift` experiment
* Revert "feat: Try `CarSwift` experiment"
This reverts commit 7794f38271 .
2024-08-12 14:18:13 +02:00
Marc Rousavy and GitHub
c101faf948
feat: Cache toObject(...) using jsi::WeakObject and correctly set externalExternalMemoryPressure ( #13 )
...
* feat: Cache `toObject(...)` using `jsi::WeakObject` and set `externalMemoryPressure` properly
* feat: Support caching different JSI types - strongly typed
2024-08-08 12:28:33 +02:00
Marc Rousavy
882054e587
feat: Support JSIConverter<AnyMap>::canConvert (+ AnyValue and unordered_map<string, T>)
2024-08-07 13:56:10 +02:00
Marc Rousavy
0b7e2b5561
fix: Fix JSICache<T> being recreated each time because of C++ template specialization
2024-08-06 01:37:08 +02:00
Marc Rousavy
87eae31207
feat: Move to templates
2024-08-02 21:45:48 +02:00
Marc Rousavy
a522f09327
fix: Put template<...> on a separate line
2024-08-02 12:37:03 +02:00
Marc Rousavy
1ca53519c5
chore: Format code
2024-08-02 00:10:17 +02:00
Marc Rousavy
c66064aa1f
fix: Use atomic_size_t to prevent race conditions in OwningReference
2024-08-01 17:13:09 +02:00
Marc Rousavy
ee41df2d99
fix: lock _mutex when lock()ing or comparing OwningReference
2024-08-01 17:09:28 +02:00
Marc Rousavy
50507b693a
fix: Fix imports
2024-07-31 17:41:25 +02:00
Marc Rousavy
9d69ba04ab
chore: Run clang format
2024-07-31 17:39:56 +02:00
Marc Rousavy
a104481e11
feat: Prettify a few edge cases in getFriendlyTypename() :)
2024-07-31 17:29:03 +02:00
Marc Rousavy
f0844b047f
feat: Properly check variant type at runtime
2024-07-31 17:19:39 +02:00
Marc Rousavy
404b125b8f
fix: Kinda builds?
2024-07-30 13:31:22 +02:00
Marc Rousavy
3e0279a71f
feat: Create JSICacheReference for safer cache access
2024-07-30 11:41:01 +02:00
Marc Rousavy
45d5342b92
feat: Use OwningLock<T> in function callbacks
2024-07-30 11:10:38 +02:00
Marc Rousavy
fc4eb15a4e
feat: Create OwningLock to lock mutex
2024-07-30 10:50:47 +02:00
Marc Rousavy
705efdc717
fix: Throw mutex on all pointer operations
2024-07-30 10:50:21 +02:00
Marc Rousavy
55b11ecd5a
Expose a few more headers
2024-07-29 12:05:04 +02:00
Marc Rousavy
786f2e9f13
fix: Use shared NitroDefines
2024-07-29 12:03:06 +02:00
Marc Rousavy
a0c7caa2a8
fix: Properly get memory size including own cache map size
2024-07-23 01:34:44 +02:00
Marc Rousavy
4257dedf64
Fix TYPEID
2024-07-22 16:31:33 +02:00
Marc Rousavy
5efd374115
Clean up ios
2024-07-18 14:18:42 +02:00
Marc Rousavy
6b15467af8
Some final declarations
2024-07-18 01:30:33 +02:00
Marc Rousavy
88d286450c
Update OwningReference.hpp
2024-07-18 01:28:08 +02:00
Marc Rousavy
803c7bfbf9
feat: Implement == for OwningReference
2024-07-18 01:25:37 +02:00
Marc Rousavy
4adc79dcfc
Rename to GetRuntimeID
2024-07-18 00:22:49 +02:00
Marc Rousavy
9451e4a376
Update NitroLogger.hpp
2024-07-18 00:09:34 +02:00
Marc Rousavy
3fe9d784aa
fix: Fix Logger
2024-07-18 00:05:15 +02:00
Marc Rousavy
c470ce0b16
Extract CXX ABI specifics to TypeInfo.hpp
2024-07-17 23:49:04 +02:00
Marc Rousavy
b5d832cf2d
perf: Make all JSIConverter calls inline
2024-07-17 23:31:52 +02:00
Marc Rousavy
1cc33e0aef
feat: Add hashString with compile time length
2024-07-17 21:57:12 +02:00
Marc Rousavy
7bc2767348
fix: Move to namespace margelo::nitro
2024-07-17 21:49:11 +02:00
Marc Rousavy
ec2be05bd6
feat: Don't expose header, fix cycle
2024-07-17 16:53:22 +02:00
Marc Rousavy
82d66ef8c8
Update Hash.hpp
2024-07-14 02:01:41 +02:00
Marc Rousavy
118614838e
feat: Move Hash.hpp into core codebase
2024-07-14 01:51:43 +02:00
Marc Rousavy
295600ecd8
Comment
2024-07-14 00:52:03 +02:00
Marc Rousavy
66ef4ad304
docs
2024-07-13 12:44:02 +02:00
Marc Rousavy and GitHub
ba5d17e824
fix: Fix destructor never deleting weak ref due to < 0
2024-07-07 20:30:02 +02:00
Marc Rousavy and GitHub
bb67b6a556
fix: Fix ref counting being smaller than 0
2024-07-07 20:29:16 +02:00
Marc Rousavy
f1c7038227
Woohoooooo!!!
2024-06-23 11:46:32 +02:00
Marc Rousavy
9dd0cd1ea5
fix
2024-06-23 11:32:01 +02:00
Marc Rousavy
6b68537fd5
Create Borrowing/Owning reference types
2024-06-23 11:26:33 +02:00
Marc Rousavy
caf953f552
fix imports
2024-06-20 10:47:50 +02:00