From 0e2e4f47f804d9e3b5eb31258b2b34fd331bf6ce Mon Sep 17 00:00:00 2001 From: Claude Bot Date: Sat, 30 Aug 2025 02:54:05 +0000 Subject: [PATCH] wip --- cmake/sources/ZigSources.txt | 2 -- cmake/targets/BuildYoga.cmake | 42 ++++++++++++++++++------------- src/bun.js/bindings/BunObject.cpp | 1 + 3 files changed, 26 insertions(+), 19 deletions(-) diff --git a/cmake/sources/ZigSources.txt b/cmake/sources/ZigSources.txt index af06d4261c..ef582c93d3 100644 --- a/cmake/sources/ZigSources.txt +++ b/cmake/sources/ZigSources.txt @@ -168,8 +168,6 @@ src/bun.js/bindings/Exception.zig src/bun.js/bindings/FetchHeaders.zig src/bun.js/bindings/FFI.zig src/bun.js/bindings/generated_classes_list.zig -src/bun.js/bindings/GeneratedBindings.zig -src/bun.js/bindings/GeneratedJS2Native.zig src/bun.js/bindings/GetterSetter.zig src/bun.js/bindings/HTTPServerAgent.zig src/bun.js/bindings/JSArray.zig diff --git a/cmake/targets/BuildYoga.cmake b/cmake/targets/BuildYoga.cmake index 14366e3fb1..e30b810f7f 100644 --- a/cmake/targets/BuildYoga.cmake +++ b/cmake/targets/BuildYoga.cmake @@ -1,18 +1,26 @@ -# Since we already have Yoga cloned, just build it directly -set(YOGA_PATH ${VENDOR_PATH}/yoga) +register_repository( + NAME + yoga + REPOSITORY + facebook/yoga + COMMIT + dc2581f229cb05c7d2af8dee37b2ee0b59fd5326 +) -if(NOT EXISTS ${YOGA_PATH}) - message(FATAL_ERROR "Yoga not found at ${YOGA_PATH}. Please clone it manually.") -endif() - -# Build Yoga as a subdirectory -add_subdirectory(${YOGA_PATH} ${BUILD_PATH}/yoga EXCLUDE_FROM_ALL) - -# Set the include directories -if(TARGET ${bun}) - target_include_directories(${bun} PRIVATE ${YOGA_PATH}) - target_link_libraries(${bun} PRIVATE yogacore) -endif() - -# Create a custom target for consistency with other dependencies -add_custom_target(yoga DEPENDS yogacore) \ No newline at end of file +register_cmake_command( + TARGET + yoga + TARGETS + yogacore + ARGS + -DBUILD_SHARED_LIBS=OFF + -DYOGA_BUILD_TESTS=OFF + -DYOGA_BUILD_SAMPLES=OFF + -DCMAKE_POSITION_INDEPENDENT_CODE=ON + LIB_PATH + lib + LIBRARIES + yogacore + INCLUDES + . +) \ No newline at end of file diff --git a/src/bun.js/bindings/BunObject.cpp b/src/bun.js/bindings/BunObject.cpp index 6969155563..85fba9bed2 100644 --- a/src/bun.js/bindings/BunObject.cpp +++ b/src/bun.js/bindings/BunObject.cpp @@ -807,6 +807,7 @@ JSC_DEFINE_HOST_FUNCTION(functionFileURLToPath, (JSC::JSGlobalObject * globalObj redis BunObject_lazyPropCb_wrap_valkey DontDelete|PropertyCallback secrets constructSecretsObject DontDelete|PropertyCallback write BunObject_callback_write DontDelete|Function 1 + YOGA constructYogaObject DontDelete|ReadOnly|PropertyCallback zstdCompressSync BunObject_callback_zstdCompressSync DontDelete|Function 1 zstdDecompressSync BunObject_callback_zstdDecompressSync DontDelete|Function 1 zstdCompress BunObject_callback_zstdCompress DontDelete|Function 1