From f5b7a6708dc4f978e61ce224e450f920137aa6e7 Mon Sep 17 00:00:00 2001 From: Ashcon Partovi Date: Wed, 11 Sep 2024 17:46:03 -0700 Subject: [PATCH] Move dependencies from `src/deps/` to `vendor/` (#13901) --- .buildkite/ci.md | 63 ----------------------------- .gitattributes | 4 +- .github/workflows/lint-cpp.yml | 2 +- .gitignore | 11 +++-- .lldbinit | 4 +- .prettierignore | 2 +- .vscode/c_cpp_properties.json | 36 ++++++++--------- .vscode/settings.json | 5 +-- CMakeLists.txt | 1 + build.zig | 2 +- cmake/Macros.cmake | 8 +++- cmake/targets/BuildBun.cmake | 27 ++++++------- cmake/targets/BuildLibArchive.cmake | 2 +- cmake/targets/BuildLolHtml.cmake | 2 +- cmake/tools/SetupZig.cmake | 3 +- jsconfig.json | 4 +- package.json | 2 +- scripts/download-zls.ps1 | 7 ---- scripts/fork-webkit.sh | 56 ------------------------- src/deps/boringssl.translated.zig | 6 +-- tsconfig.json | 4 +- 21 files changed, 62 insertions(+), 189 deletions(-) delete mode 100644 .buildkite/ci.md delete mode 100755 scripts/download-zls.ps1 delete mode 100755 scripts/fork-webkit.sh diff --git a/.buildkite/ci.md b/.buildkite/ci.md deleted file mode 100644 index 57dde54e69..0000000000 --- a/.buildkite/ci.md +++ /dev/null @@ -1,63 +0,0 @@ -## CI - -How does CI work? - -### Building - -Bun is built on macOS, Linux, and Windows. The process is split into the following steps, the first 3 of which are able to run in parallel: - -#### 1. `build-deps` - -Builds the static libaries in `src/deps` and outputs a directory: `build/bun-deps`. - -- on Windows, this runs the script: [`scripts/all-dependencies.ps1`](scripts/all-dependencies.ps1) -- on macOS and Linux, this runs the script: [`scripts/all-dependencies.sh`](scripts/all-dependencies.sh) - -#### 2. `build-zig` - -Builds the Zig object file: `build/bun-zig.o`. Since `zig build` supports cross-compiling, this step is run on macOS aarch64 since we have observed it to be the fastest. - -- on macOS and Linux, this runs the script: [`scripts/build-bun-zig.sh`](scripts/build-bun-zig.sh) - -#### 3. `build-cpp` - -Builds the C++ object file: `build/bun-cpp-objects.a`. - -- on Windows, this runs the script: [`scripts/build-bun-cpp.ps1`](scripts/build-bun-cpp.ps1) -- on macOS and Linux, this runs the script: [`scripts/build-bun-cpp.sh`](scripts/build-bun-cpp.sh) - -#### 4. `link` / `build-bun` - -After the `build-deps`, `build-zig`, and `build-cpp` steps have completed, this step links the Zig object file and C++ object file into a single binary: `bun--.zip`. - -- on Windows, this runs the script: [`scripts/buildkite-link-bun.ps1`](scripts/buildkite-link-bun.ps1) -- on macOS and Linux, this runs the script: [`scripts/buildkite-link-bun.sh`](scripts/buildkite-link-bun.sh) - -To speed up the build, thare are two options: - -- `--fast`: This disables the LTO (link-time optimization) step. -- without `--fast`: This runs the LTO step, which is the default. The binaries that are release to Github are always built with LTO. - -### Testing - -### FAQ - -> How do I add a new CI agent? - -> How do I add/modify system dependencies? - -> How do I SSH into a CI agent? - -### Known issues - -These are things that we know about, but haven't fixed or optimized yet. - -- There is no `scripts/build-bun-zig.ps1` for Windows. - -- The `build-deps` step does not cache in CI, so it re-builds each time (though it does use ccache). It attempts to check the `BUN_DEPS_CACHE_DIR` environment variable, but for some reason it doesn't work. - -- Windows and Linux machines sometimes take up to 1-2 minutes to start tests. This is because robobun is listening for when the job is scheduled to provision the VM. Instead, it can start provisioning during the link step, or keep a pool of idle VMs around (but it's unclear how more expensive this is). - -- There are a limited number of macOS VMs. This is because they are expensive and manually provisioned, mostly through MacStadium. If wait times are too long we can just provision more, or buy some. - -- To prevent idle machines, robobun periodically checks for idle machines and terminates them. Before doing this, it checks to see if the machine is connected as an agent to Buildkite. However, sometimes the machine picks up a job in-between this time, and the job is terminated. diff --git a/.gitattributes b/.gitattributes index b218900021..7f44299cfc 100644 --- a/.gitattributes +++ b/.gitattributes @@ -44,8 +44,8 @@ test/**/* linguist-documentation bench/**/* linguist-documentation examples/**/* linguist-documentation -src/deps/*.c linguist-vendored -src/deps/brotli/** linguist-vendored +vendor/*.c linguist-vendored +vendor/brotli/** linguist-vendored test/js/node/test/fixtures linguist-vendored test/js/node/test/common linguist-vendored diff --git a/.github/workflows/lint-cpp.yml b/.github/workflows/lint-cpp.yml index 2346c16393..5841745ac3 100644 --- a/.github/workflows/lint-cpp.yml +++ b/.github/workflows/lint-cpp.yml @@ -17,7 +17,7 @@ on: # paths: # - ".github/workflows/lint-cpp.yml" # - "**/*.cpp" - # - "src/deps/**/*" + # - "vendor/**/*" # - "CMakeLists.txt" jobs: diff --git a/.gitignore b/.gitignore index d2b8e54639..d251b9e05e 100644 --- a/.gitignore +++ b/.gitignore @@ -49,7 +49,6 @@ /build-*/ /bun-webkit /kcov-out -/src/deps/libuv /test-report.json /test-report.md /test.js @@ -117,11 +116,6 @@ sign.json src/bun.js/bindings-obj src/bun.js/bindings/GeneratedJS2Native.zig src/bun.js/debug-bindings-obj -src/deps/c-ares/build -src/deps/libiconv -src/deps/openssl -src/deps/PLCrashReporter/ -src/deps/s2n-tls src/deps/zig-clap/.gitattributes src/deps/zig-clap/.github src/deps/zig-clap/example @@ -148,7 +142,12 @@ test/node.js/upstream scripts/env.local # Dependencies +/vendor + +# Dependencies (before CMake) +# These can be removed in the far future /src/bun.js/WebKit +/src/deps/WebKit /src/deps/boringssl /src/deps/brotli /src/deps/c*ares diff --git a/.lldbinit b/.lldbinit index 5a59503d5d..b54a4195c3 100644 --- a/.lldbinit +++ b/.lldbinit @@ -1,4 +1,4 @@ -command script import src/deps/zig/tools/lldb_pretty_printers.py -command script import src/bun.js/WebKit/Tools/lldb/lldb_webkit.py +command script import vendor/zig/tools/lldb_pretty_printers.py +command script import vendor/WebKit/Tools/lldb/lldb_webkit.py # type summary add --summary-string "${var} | inner=${var[0-30]}, source=${var[33-64]}, tag=${var[31-32]}" "unsigned long" diff --git a/.prettierignore b/.prettierignore index ea7e4eeb79..da765c9c28 100644 --- a/.prettierignore +++ b/.prettierignore @@ -1,5 +1,5 @@ src/bun.js/WebKit -src/deps +vendor test/snapshots test/js/deno test/node.js diff --git a/.vscode/c_cpp_properties.json b/.vscode/c_cpp_properties.json index 2f84ff1c2a..108bcddc4a 100644 --- a/.vscode/c_cpp_properties.json +++ b/.vscode/c_cpp_properties.json @@ -13,8 +13,8 @@ "${workspaceFolder}/src/bun.js/bindings/webcrypto/", "${workspaceFolder}/src/bun.js/modules/", "${workspaceFolder}/src/js/builtins/", - "${workspaceFolder}/src/deps/boringssl/include/", - "${workspaceFolder}/src/deps", + "${workspaceFolder}/vendor/boringssl/include/", + "${workspaceFolder}/vendor", "${workspaceFolder}/src/napi/*", "${workspaceFolder}/packages/bun-usockets/src", "${workspaceFolder}/packages/", @@ -26,8 +26,8 @@ "${workspaceFolder}/src/napi/*", "${workspaceFolder}/src/js/builtins/*", "${workspaceFolder}/src/bun.js/modules/*", - "${workspaceFolder}/src/deps/*", - "${workspaceFolder}/src/deps/boringssl/include/*", + "${workspaceFolder}/vendor/*", + "${workspaceFolder}/vendor/boringssl/include/*", "${workspaceFolder}/packages/bun-usockets/*", "${workspaceFolder}/packages/bun-uws/*", "${workspaceFolder}/src/napi/*", @@ -56,11 +56,11 @@ "forcedInclude": ["${workspaceFolder}/src/bun.js/bindings/root.h"], "includePath": [ "${workspaceFolder}/build/codegen", - "${workspaceFolder}/src/bun.js/WebKit/WebKitBuild/Debug/", - "${workspaceFolder}/src/bun.js/WebKit/WebKitBuild/Debug/ICU/Headers/", - "${workspaceFolder}/src/bun.js/WebKit/WebKitBuild/Debug/JavaScriptCore/PrivateHeaders/", - "${workspaceFolder}/src/bun.js/WebKit/WebKitBuild/Debug/WTF/Headers", - "${workspaceFolder}/src/bun.js/WebKit/WebKitBuild/Debug/bmalloc/Headers/", + "${workspaceFolder}/vendor/WebKit/WebKitBuild/Debug/", + "${workspaceFolder}/vendor/WebKit/WebKitBuild/Debug/ICU/Headers/", + "${workspaceFolder}/vendor/WebKit/WebKitBuild/Debug/JavaScriptCore/PrivateHeaders/", + "${workspaceFolder}/vendor/WebKit/WebKitBuild/Debug/WTF/Headers", + "${workspaceFolder}/vendor/WebKit/WebKitBuild/Debug/bmalloc/Headers/", "${workspaceFolder}/src/bun.js/bindings/", "${workspaceFolder}/src/bun.js/bindings/webcore/", "${workspaceFolder}/src/bun.js/bindings/sqlite/", @@ -68,19 +68,19 @@ "${workspaceFolder}/src/bun.js/modules/", "${workspaceFolder}/src/js/builtins/", "${workspaceFolder}/src/js/out", - "${workspaceFolder}/src/deps/boringssl/include/", - "${workspaceFolder}/src/deps", + "${workspaceFolder}/vendor/boringssl/include/", + "${workspaceFolder}/vendor", "${workspaceFolder}/src/napi/*", "${workspaceFolder}/packages/bun-usockets/src", "${workspaceFolder}/packages/", ], "browse": { "path": [ - "${workspaceFolder}/src/bun.js/WebKit/WebKitBuild/Debug/", - "${workspaceFolder}/src/bun.js/WebKit/WebKitBuild/Debug/ICU/Headers/", - "${workspaceFolder}/src/bun.js/WebKit/WebKitBuild/Debug/JavaScriptCore/PrivateHeaders/**", - "${workspaceFolder}/src/bun.js/WebKit/WebKitBuild/Debug/WTF/Headers/**", - "${workspaceFolder}/src/bun.js/WebKit/WebKitBuild/Debug/bmalloc/Headers/**", + "${workspaceFolder}/vendor/WebKit/WebKitBuild/Debug/", + "${workspaceFolder}/vendor/WebKit/WebKitBuild/Debug/ICU/Headers/", + "${workspaceFolder}/vendor/WebKit/WebKitBuild/Debug/JavaScriptCore/PrivateHeaders/**", + "${workspaceFolder}/vendor/WebKit/WebKitBuild/Debug/WTF/Headers/**", + "${workspaceFolder}/vendor/WebKit/WebKitBuild/Debug/bmalloc/Headers/**", "${workspaceFolder}/src/bun.js/bindings/*", "${workspaceFolder}/src/bun.js/bindings/*", "${workspaceFolder}/src/napi/*", @@ -90,8 +90,8 @@ "${workspaceFolder}/src/js/builtins/*", "${workspaceFolder}/src/js/out/*", "${workspaceFolder}/src/bun.js/modules/*", - "${workspaceFolder}/src/deps", - "${workspaceFolder}/src/deps/boringssl/include/", + "${workspaceFolder}/vendor", + "${workspaceFolder}/vendor/boringssl/include/", "${workspaceFolder}/packages/bun-usockets/", "${workspaceFolder}/packages/bun-uws/", "${workspaceFolder}/src/napi", diff --git a/.vscode/settings.json b/.vscode/settings.json index e9135f0993..e1e8aa36ba 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -12,8 +12,7 @@ "search.exclude": { "node_modules": true, ".git": true, - "src/bun.js/WebKit": true, - "src/deps/*/**": true, + "vendor/*/**": true, "test/node.js/upstream": true, // This will fill up your whole search history. "test/js/node/test/fixtures": true, @@ -30,7 +29,7 @@ // Zig "zig.initialSetupDone": true, "zig.buildOption": "build", - "zig.zls.zigLibPath": "${workspaceFolder}/src/deps/zig/lib", + "zig.zls.zigLibPath": "${workspaceFolder}/vendor/zig/lib", "zig.buildArgs": ["-Dgenerated-code=./build/codegen"], "zig.zls.buildOnSaveStep": "check", // "zig.zls.enableBuildOnSave": true, diff --git a/CMakeLists.txt b/CMakeLists.txt index bbaa700844..875cf2e633 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -20,6 +20,7 @@ setx(BUILD_PATH ${CMAKE_BINARY_DIR}) optionx(CACHE_PATH STRING "The path to the cache directory" DEFAULT ${BUILD_PATH}/cache) optionx(CACHE_STRATEGY "read-write|read-only|write-only|none" "The strategy to use for caching" DEFAULT "read-write") optionx(TMP_PATH STRING "The path to the temporary directory" DEFAULT ${BUILD_PATH}/tmp) +optionx(FRESH BOOL "Set when --fresh is used" DEFAULT OFF) # --- Compilers --- diff --git a/build.zig b/build.zig index 876a356a9f..68496365d3 100644 --- a/build.zig +++ b/build.zig @@ -132,7 +132,7 @@ pub fn getCpuModel(os: OperatingSystem, arch: Arch) ?Target.Query.CpuModel { pub fn build(b: *Build) !void { std.log.info("zig compiler v{s}", .{builtin.zig_version_string}); - b.zig_lib_dir = b.zig_lib_dir orelse b.path("src/deps/zig/lib"); + b.zig_lib_dir = b.zig_lib_dir orelse b.path("vendor/zig/lib"); var target_query = b.standardTargetOptionsQueryOnly(.{}); const optimize = b.standardOptimizeOption(.{}); diff --git a/cmake/Macros.cmake b/cmake/Macros.cmake index 2f62c4c22f..c5e37718ec 100644 --- a/cmake/Macros.cmake +++ b/cmake/Macros.cmake @@ -501,7 +501,7 @@ function(register_repository) endif() if(NOT GIT_PATH) - set(GIT_PATH ${CWD}/src/deps/${GIT_NAME}) + set(GIT_PATH ${CWD}/vendor/${GIT_NAME}) endif() if(GIT_COMMIT) @@ -562,7 +562,7 @@ function(register_cmake_command) endif() if(NOT MAKE_CWD) - set(MAKE_CWD ${CWD}/src/deps/${MAKE_TARGET}) + set(MAKE_CWD ${CWD}/vendor/${MAKE_TARGET}) endif() if(NOT MAKE_BUILD_PATH) @@ -624,6 +624,10 @@ function(register_cmake_command) list(APPEND MAKE_EFFECTIVE_ARGS -DCMAKE_${flag}=${MAKE_${flag}}) endforeach() + if(DEFINED FRESH) + list(APPEND MAKE_EFFECTIVE_ARGS --fresh) + endif() + register_command( COMMENT "Configuring ${MAKE_TARGET}" TARGET configure-${MAKE_TARGET} diff --git a/cmake/targets/BuildBun.cmake b/cmake/targets/BuildBun.cmake index 43ca8076c4..62f297aa6f 100644 --- a/cmake/targets/BuildBun.cmake +++ b/cmake/targets/BuildBun.cmake @@ -27,10 +27,10 @@ endif() # In the future, change those commands so that generated files are written to this path. optionx(CODEGEN_PATH FILEPATH "Path to the codegen directory" DEFAULT ${BUILD_PATH}/codegen) -if(NOT CONFIGURE_DEPENDS) - set(CONFIGURE_DEPENDS "") -else() +if((NOT DEFINED CONFIGURE_DEPENDS AND NOT CI) OR CONFIGURE_DEPENDS) set(CONFIGURE_DEPENDS "CONFIGURE_DEPENDS") +else() + set(CONFIGURE_DEPENDS "") endif() # --- Codegen --- @@ -442,17 +442,14 @@ WEBKIT_ADD_SOURCE_DEPENDENCIES( # --- Zig --- -# Does not use GLOB_RECURSE because it makes configure really slow with WebKit -# We might want to consider moving our dependencies out of src/ because of this. -file(GLOB BUN_ZIG_SOURCES ${CONFIGURE_DEPENDS} - ${CWD}/*.zig - ${CWD}/src/*/*.zig - ${CWD}/src/*/*/*.zig - ${CWD}/src/*/*/*/*.zig - ${CWD}/src/*/*/*/*/*.zig +file(GLOB_RECURSE BUN_ZIG_SOURCES ${CONFIGURE_DEPENDS} + ${CWD}/src/*.zig ) list(APPEND BUN_ZIG_SOURCES + ${CWD}/build.zig + ${CWD}/root.zig + ${CWD}/root_wasm.zig ${BUN_ZIG_IDENTIFIER_OUTPUTS} ${BUN_ERROR_OUTPUTS} ${BUN_FALLBACK_DECODER_OUTPUT} @@ -498,7 +495,6 @@ set_property(DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS "build.zig") # --- C/C++ Sources --- -set(BUN_DEPS_SOURCE ${CWD}/src/deps) set(BUN_USOCKETS_SOURCE ${CWD}/packages/bun-usockets) file(GLOB BUN_CXX_SOURCES ${CONFIGURE_DEPENDS} @@ -510,8 +506,8 @@ file(GLOB BUN_CXX_SOURCES ${CONFIGURE_DEPENDS} ${CWD}/src/bun.js/bindings/webcrypto/*.cpp ${CWD}/src/bun.js/bindings/webcrypto/*/*.cpp ${CWD}/src/bun.js/bindings/v8/*.cpp + ${CWD}/src/deps/*.cpp ${BUN_USOCKETS_SOURCE}/src/crypto/*.cpp - ${BUN_DEPS_SOURCE}/*.cpp ) file(GLOB BUN_C_SOURCES ${CONFIGURE_DEPENDS} @@ -532,7 +528,7 @@ register_repository( picohttpparser.c ) -list(APPEND BUN_C_SOURCES ${BUN_DEPS_SOURCE}/picohttpparser/picohttpparser.c) +list(APPEND BUN_C_SOURCES ${CWD}/vendor/picohttpparser/picohttpparser.c) if(WIN32) list(APPEND BUN_C_SOURCES ${CWD}/src/bun.js/bindings/windows/musl-memmem.c) @@ -622,7 +618,8 @@ target_include_directories(${bun} PRIVATE ${CWD}/src/js/builtins ${CWD}/src/napi ${CWD}/src/deps - ${CWD}/src/deps/picohttpparser + ${CWD}/vendor + ${CWD}/vendor/picohttpparser ${CODEGEN_PATH} ) diff --git a/cmake/targets/BuildLibArchive.cmake b/cmake/targets/BuildLibArchive.cmake index 156fec2b4f..7c2393921f 100644 --- a/cmake/targets/BuildLibArchive.cmake +++ b/cmake/targets/BuildLibArchive.cmake @@ -40,7 +40,7 @@ register_cmake_command( # spawn a processes to compress instead of using the library. -DENABLE_ZLIB=OFF -DHAVE_ZLIB_H=ON - -DCMAKE_C_FLAGS="-I${CWD}/src/deps/zlib" + -DCMAKE_C_FLAGS="-I${CWD}/vendor/zlib" LIB_PATH libarchive LIBRARIES diff --git a/cmake/targets/BuildLolHtml.cmake b/cmake/targets/BuildLolHtml.cmake index 1fd6645c34..8cfd51cc2c 100644 --- a/cmake/targets/BuildLolHtml.cmake +++ b/cmake/targets/BuildLolHtml.cmake @@ -10,7 +10,7 @@ register_repository( 8d4c273ded322193d017042d1f48df2766b0f88b ) -set(LOLHTML_CWD ${CWD}/src/deps/lolhtml/c-api) +set(LOLHTML_CWD ${CWD}/vendor/lolhtml/c-api) set(LOLHTML_BUILD_PATH ${BUILD_PATH}/lolhtml) if(DEBUG) diff --git a/cmake/tools/SetupZig.cmake b/cmake/tools/SetupZig.cmake index 33be81ac19..90dd7e71de 100644 --- a/cmake/tools/SetupZig.cmake +++ b/cmake/tools/SetupZig.cmake @@ -47,7 +47,7 @@ optionx(ZIG_VERSION STRING "The version of zig to use" DEFAULT "0.13.0") optionx(ZIG_LOCAL_CACHE_DIR FILEPATH "The path to local the zig cache directory" DEFAULT ${CACHE_PATH}/zig/local) optionx(ZIG_GLOBAL_CACHE_DIR FILEPATH "The path to the global zig cache directory" DEFAULT ${CACHE_PATH}/zig/global) optionx(ZIG_BIN_CACHE_DIR FILEPATH "The path to the zig binary cache directory" DEFAULT ${CACHE_PATH}/zig/bin) -optionx(ZIG_REPOSITORY_PATH FILEPATH "The path to the Zig repository" DEFAULT ${CWD}/src/deps/zig) +optionx(ZIG_REPOSITORY_PATH FILEPATH "The path to the Zig repository" DEFAULT ${CWD}/vendor/zig) register_repository( NAME @@ -116,7 +116,6 @@ else() endif() setx(ZIG_DOWNLOAD_URL https://ziglang.org/download/${ZIG_VERSION}/${ZIG_FILENAME}) - file(DOWNLOAD ${ZIG_DOWNLOAD_URL} ${ZIG_BIN_CACHE_DIR}/${ZIG_FILENAME}) file(ARCHIVE_EXTRACT INPUT ${ZIG_BIN_CACHE_DIR}/${ZIG_FILENAME} DESTINATION ${ZIG_BIN_CACHE_DIR}) file(REMOVE ${ZIG_BIN_CACHE_DIR}/${ZIG_FILENAME}) diff --git a/jsconfig.json b/jsconfig.json index 7d894d529d..0fecda676b 100644 --- a/jsconfig.json +++ b/jsconfig.json @@ -12,9 +12,9 @@ "bench", "examples/*/*", "test", - "src/deps", + "vendor", "bun-webkit", - "src/bun.js/WebKit", + "vendor/WebKit", "src/api/demo", "node_modules" ], diff --git a/package.json b/package.json index 3779140ba2..c0ae4ff476 100644 --- a/package.json +++ b/package.json @@ -36,7 +36,7 @@ "build:logs": "bun ./scripts/build.mjs -GNinja -DCMAKE_BUILD_TYPE=Release -DENABLE_LOGS=ON -B build/release-logs", "build:safe": "bun ./scripts/build.mjs -GNinja -DCMAKE_BUILD_TYPE=Release -DZIG_OPTIMIZE=ReleaseSafe -B build/release-safe", "build:smol": "bun ./scripts/build.mjs -GNinja -DCMAKE_BUILD_TYPE=MinSizeRel -B build/release-smol", - "build:release:local": "cmake . -DCMAKE_BUILD_TYPE=Release -DWEBKIT_DIR=$(pwd)/src/bun.js/WebKit/WebKitBuild/Release -GNinja -Bbuild-release-local && ninja -Cbuild-release-local", + "build:release:local": "cmake . -DCMAKE_BUILD_TYPE=Release -DWEBKIT_DIR=$(pwd)/vendor/WebKit/WebKitBuild/Release -GNinja -Bbuild-release-local && ninja -Cbuild-release-local", "build:release:with_logs": "cmake . -DCMAKE_BUILD_TYPE=Release -DENABLE_LOGS=true -GNinja -Bbuild-release && ninja -Cbuild-release", "build:debug-zig-release": "cmake . -DCMAKE_BUILD_TYPE=Release -DZIG_OPTIMIZE=Debug -GNinja -Bbuild-debug-zig-release && ninja -Cbuild-debug-zig-release", "bump": "bun ./scripts/bump.ts", diff --git a/scripts/download-zls.ps1 b/scripts/download-zls.ps1 deleted file mode 100755 index 18b693ea24..0000000000 --- a/scripts/download-zls.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -push-location .cache -try { - git clone https://github.com/zigtools/zls - set-location zls - git checkout a26718049a8657d4da04c331aeced1697bc7652b - ..\zig\zig.exe build -Doptimize=ReleaseFast -} finally { Pop-Location } diff --git a/scripts/fork-webkit.sh b/scripts/fork-webkit.sh deleted file mode 100755 index fe90c6c6f7..0000000000 --- a/scripts/fork-webkit.sh +++ /dev/null @@ -1,56 +0,0 @@ -#!/usr/bin/env bash -# this script is the magic script to configure your devenv for making a patch to WebKit -# once you are done with the patch you can run this again with --undo -# you can also run this with --danger-reset to force reset the submodule (danger) -set -exo pipefail - -cd "$(dirname "$0")/.." - -if [ "$#" == "0" ]; then - if ! [ -d build ]; then - bash ./scripts/setup.sh - fi - - bash ./scripts/update-submodules.sh --webkit - - platform=linux - if [ "$(uname)" == "Darwin" ]; then - platform=mac - fi - - make jsc-build-${platform}-compile-debug - cmake -Bbuild -DWEBKIT_DIR=$(pwd)/src/bun.js/WebKit/WebKitBuild/Debug - # ninja -Cbuild - - echo "" - echo "Ready" - echo "" - echo "TODO: add a better way to invoke the webkit build script" - echo "For now to recompile WebKit, run:" - echo "" - echo " $ make jsc-build-${platform}-compile-debug && ninja -Cbuild" - echo "" - echo "To reset this back to using prebuild, run:" - echo "" - echo " $ $0 --undo" - echo " $ $0 --danger-reset # this invokes 'git reset --hard'" - echo "" - - - exit; -fi - -if [ "$1" == '--undo' ]; then - cmake -Bbuild -UWEBKIT_DIR - echo Reset ./build to use the system WebKit - exit; -fi - -if [ "$1" == '--danger-reset' ]; then - cmake -Bbuild -UWEBKIT_DIR - bash ./scripts/set-webkit-submodule-to-cmake.sh - exit; -fi - -echo "Unknown argument: $1" -echo "Usage: $0 [--undo/--danger-reset]" \ No newline at end of file diff --git a/src/deps/boringssl.translated.zig b/src/deps/boringssl.translated.zig index 4c5a644b50..ee25a0948d 100644 --- a/src/deps/boringssl.translated.zig +++ b/src/deps/boringssl.translated.zig @@ -176,7 +176,7 @@ pub const struct_bn_mont_ctx_st = extern struct { }; pub const BN_MONT_CTX = struct_bn_mont_ctx_st; pub const struct_bn_blinding_st = opaque {}; -pub const BN_BLINDING = struct_bn_blinding_st; // src/deps/boringssl/include/openssl/rsa.h:788:12: warning: struct demoted to opaque type - has bitfield +pub const BN_BLINDING = struct_bn_blinding_st; // boringssl/include/openssl/rsa.h:788:12: warning: struct demoted to opaque type - has bitfield pub const struct_rsa_st = opaque {}; pub const RSA = struct_rsa_st; pub const struct_dsa_st = extern struct { @@ -292,8 +292,8 @@ pub const struct_buf_mem_st = extern struct { max: usize, }; pub const BUF_MEM = struct_buf_mem_st; -pub const CBB = struct_cbb_st; // src/deps/boringssl/include/openssl/bytestring.h:403:12: warning: struct demoted to opaque type - has bitfield -pub const struct_cbb_buffer_st = opaque {}; // src/deps/boringssl/include/openssl/bytestring.h:418:12: warning: struct demoted to opaque type - has bitfield +pub const CBB = struct_cbb_st; // boringssl/include/openssl/bytestring.h:403:12: warning: struct demoted to opaque type - has bitfield +pub const struct_cbb_buffer_st = opaque {}; // boringssl/include/openssl/bytestring.h:418:12: warning: struct demoted to opaque type - has bitfield pub const struct_cbb_child_st = opaque {}; const union_unnamed_3 = extern union { base: struct_cbb_buffer_st, diff --git a/tsconfig.json b/tsconfig.json index 1ccf2d7370..e417b43288 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -15,9 +15,9 @@ "bench", "examples/*/*", "test", - "src/deps", + "vendor", "bun-webkit", - "src/bun.js/WebKit", + "vendor/WebKit", "src/api/demo", "node_modules" ],