+1
-2
@@ -8,3 +8,3 @@ cmake_minimum_required(VERSION 4.0) | ||
| fetch_package("github:holepunchto/bare@1.24.5") | ||
| fetch_package("github:holepunchto/bare@1.25.0") | ||
| fetch_package("github:holepunchto/libpath") | ||
@@ -80,3 +80,2 @@ fetch_package("github:holepunchto/libjstl") | ||
| PRIVATE | ||
| log_static | ||
| rlimit_static | ||
@@ -83,0 +82,0 @@ path_static |
+3
-8
@@ -5,3 +5,2 @@ #include <assert.h> | ||
| #include <js.h> | ||
| #include <log.h> | ||
| #include <sys/timerfd.h> | ||
@@ -28,2 +27,3 @@ #include <unistd.h> | ||
| static ANativeActivity bare__native_activity; | ||
| static AAsset *bare__bundle = nullptr; | ||
@@ -111,5 +111,2 @@ ANativeActivity *bare_native_activity = &bare__native_activity; | ||
| err = log_open("bare", 0); | ||
| assert(err == 0); | ||
| uv_setup_args(0, nullptr); | ||
@@ -135,5 +132,5 @@ | ||
| AAsset *asset = AAssetManager_open(bare__native_activity.assetManager, "app.bundle", AASSET_MODE_BUFFER); | ||
| bare__bundle = AAssetManager_open(bare__native_activity.assetManager, "app.bundle", AASSET_MODE_BUFFER); | ||
| uv_buf_t entry = uv_buf_init((char *) AAsset_getBuffer(asset), AAsset_getLength(asset)); | ||
| uv_buf_t entry = uv_buf_init((char *) AAsset_getBuffer(bare__bundle), AAsset_getLength(bare__bundle)); | ||
@@ -143,4 +140,2 @@ err = bare_load(bare, "bare:/app.bundle", &entry, nullptr); | ||
| AAsset_close(asset); | ||
| ALooper *looper = ALooper_forThread(); | ||
@@ -147,0 +142,0 @@ |
+3
-7
@@ -15,3 +15,4 @@ #pragma once | ||
| js_env_t *env; | ||
| js_ref_t *ctx; | ||
| js_persistent_t<js_object_t> ctx; | ||
| }; | ||
@@ -21,7 +22,2 @@ | ||
| bare_ndk_web_view__on_release(js_env_t *env, bare_ndk_web_view_t *web_view) { | ||
| int err; | ||
| err = js_delete_reference(env, web_view->ctx); | ||
| assert(err == 0); | ||
| delete web_view; | ||
@@ -54,3 +50,3 @@ } | ||
| err = js_create_reference(env, argv[1], 1, &web_view->ctx); | ||
| err = js_create_reference(env, js_object_t(argv[1]), web_view->ctx); | ||
| assert(err == 0); | ||
@@ -57,0 +53,0 @@ |
+1
-1
| { | ||
| "name": "bare-ndk", | ||
| "version": "0.1.2", | ||
| "version": "0.1.3", | ||
| "description": "Android NDK bindings and runtime for Bare", | ||
@@ -5,0 +5,0 @@ "exports": { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
363075112
5.71%