aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com> 2023-08-31 03:30:35 -0700
committerGravatar Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com> 2023-08-31 03:30:35 -0700
commit9c4a4dd4bac2c67f2a2b7256ef0d03ee2062ed64 (patch)
tree5dd9702943751b455c45d91117ed51ef56dc2309
parentbd7262f037589a69be8b5fb2f705666309c32b86 (diff)
downloadbun-9c4a4dd4bac2c67f2a2b7256ef0d03ee2062ed64.tar.gz
bun-9c4a4dd4bac2c67f2a2b7256ef0d03ee2062ed64.tar.zst
bun-9c4a4dd4bac2c67f2a2b7256ef0d03ee2062ed64.zip
Move webKit metadata
-rw-r--r--.dockerignore4
-rw-r--r--.prettierignore2
-rw-r--r--.scripts/write-versions.sh2
-rw-r--r--.vscode/c_cpp_properties.json20
-rw-r--r--Makefile14
-rw-r--r--docs/project/development.md4
-rw-r--r--docs/upgrading-webkit.md4
-rw-r--r--packages/bun-inspector-frontend/build.ts4
-rw-r--r--tsconfig.json2
9 files changed, 28 insertions, 28 deletions
diff --git a/.dockerignore b/.dockerignore
index 25ea26522..1a7545dc5 100644
--- a/.dockerignore
+++ b/.dockerignore
@@ -1,6 +1,6 @@
node_modules
**/node_modules
-src/bun.js/WebKit/LayoutTests
+WebKit/LayoutTests
zig-out
zig-build
**/*.o
@@ -10,7 +10,7 @@ examples
**/.next
.git
-src/bun.js/WebKit
+WebKit
**/CMakeCache.txt
packages/**/bun
packages/**/bun-profile
diff --git a/.prettierignore b/.prettierignore
index c16a3a92c..224ea0101 100644
--- a/.prettierignore
+++ b/.prettierignore
@@ -1,5 +1,5 @@
src/fallback.html
-src/bun.js/WebKit
+WebKit
src/js/out
src/*.out.js
src/*out.*.js
diff --git a/.scripts/write-versions.sh b/.scripts/write-versions.sh
index b748b842d..d5c2bbe20 100644
--- a/.scripts/write-versions.sh
+++ b/.scripts/write-versions.sh
@@ -1,7 +1,7 @@
#!/bin/bash
set -euxo pipefail
-WEBKIT_VERSION=$(git rev-parse HEAD:./src/bun.js/WebKit)
+WEBKIT_VERSION=$(git rev-parse HEAD:./WebKit)
MIMALLOC_VERSION=$(git rev-parse HEAD:./src/deps/mimalloc)
LIBARCHIVE_VERSION=$(git rev-parse HEAD:./src/deps/libarchive)
PICOHTTPPARSER_VERSION=$(git rev-parse HEAD:./src/deps/picohttpparser)
diff --git a/.vscode/c_cpp_properties.json b/.vscode/c_cpp_properties.json
index 3295d6012..16159c426 100644
--- a/.vscode/c_cpp_properties.json
+++ b/.vscode/c_cpp_properties.json
@@ -6,11 +6,11 @@
"includePath": [
"${workspaceFolder}/../webkit-build/include/",
"${workspaceFolder}/bun-webkit/include/",
- "${workspaceFolder}/src/bun.js/WebKit/WebKitBuild/Release/",
- "${workspaceFolder}/src/bun.js/WebKit/WebKitBuild/Release/ICU/Headers/",
- "${workspaceFolder}/src/bun.js/WebKit/WebKitBuild/Release/JavaScriptCore/PrivateHeaders/",
- "${workspaceFolder}/src/bun.js/WebKit/WebKitBuild/Release/WTF/Headers",
- "${workspaceFolder}/src/bun.js/WebKit/WebKitBuild/Release/bmalloc/Headers/",
+ "${workspaceFolder}/WebKit/WebKitBuild/Release/",
+ "${workspaceFolder}/WebKit/WebKitBuild/Release/ICU/Headers/",
+ "${workspaceFolder}/WebKit/WebKitBuild/Release/JavaScriptCore/PrivateHeaders/",
+ "${workspaceFolder}/WebKit/WebKitBuild/Release/WTF/Headers",
+ "${workspaceFolder}/WebKit/WebKitBuild/Release/bmalloc/Headers/",
"${workspaceFolder}/src/bun.js/bindings/",
"${workspaceFolder}/src/bun.js/bindings/webcore/",
"${workspaceFolder}/src/bun.js/bindings/sqlite/",
@@ -28,11 +28,11 @@
"path": [
"${workspaceFolder}/../webkit-build/include/",
"${workspaceFolder}/bun-webkit/include/",
- "${workspaceFolder}/src/bun.js/WebKit/WebKitBuild/Release/",
- "${workspaceFolder}/src/bun.js/WebKit/WebKitBuild/Release/ICU/Headers/",
- "${workspaceFolder}/src/bun.js/WebKit/WebKitBuild/Release/JavaScriptCore/PrivateHeaders/**",
- "${workspaceFolder}/src/bun.js/WebKit/WebKitBuild/Release/WTF/Headers/**",
- "${workspaceFolder}/src/bun.js/WebKit/WebKitBuild/Release/bmalloc/Headers/**",
+ "${workspaceFolder}/WebKit/WebKitBuild/Release/",
+ "${workspaceFolder}/WebKit/WebKitBuild/Release/ICU/Headers/",
+ "${workspaceFolder}/WebKit/WebKitBuild/Release/JavaScriptCore/PrivateHeaders/**",
+ "${workspaceFolder}/WebKit/WebKitBuild/Release/WTF/Headers/**",
+ "${workspaceFolder}/WebKit/WebKitBuild/Release/bmalloc/Headers/**",
"${workspaceFolder}/src/bun.js/bindings/*",
"${workspaceFolder}/src/bun.js/bindings/*",
"${workspaceFolder}/src/napi/*",
diff --git a/Makefile b/Makefile
index fbc2649aa..36393a0ea 100644
--- a/Makefile
+++ b/Makefile
@@ -68,7 +68,7 @@ BUN_RELEASE_BIN = $(PACKAGE_DIR)/bun
PRETTIER ?= $(shell which prettier 2>/dev/null || echo "./node_modules/.bin/prettier")
ESBUILD = $(shell which esbuild 2>/dev/null || echo "./node_modules/.bin/esbuild")
DSYMUTIL ?= $(shell which dsymutil 2>/dev/null || which dsymutil-15 2>/dev/null)
-WEBKIT_DIR ?= $(realpath src/bun.js/WebKit)
+WEBKIT_DIR ?= $(realpath WebKit)
WEBKIT_RELEASE_DIR ?= $(WEBKIT_DIR)/WebKitBuild/Release
WEBKIT_DEBUG_DIR ?= $(WEBKIT_DIR)/WebKitBuild/Debug
WEBKIT_RELEASE_DIR_LTO ?= $(WEBKIT_DIR)/WebKitBuild/ReleaseLTO
@@ -682,8 +682,8 @@ assert-deps:
# the following allows you to run `make submodule` to update or init submodules. but we will exclude webkit
# unless you explicity clone it yourself (a huge download)
SUBMODULE_NAMES=$(shell cat .gitmodules | grep 'path = ' | awk '{print $$3}')
-ifeq ("$(wildcard src/bun.js/WebKit/.git)", "")
- SUBMODULE_NAMES := $(filter-out src/bun.js/WebKit, $(SUBMODULE_NAMES))
+ifeq ("$(wildcard WebKit/.git)", "")
+ SUBMODULE_NAMES := $(filter-out WebKit, $(SUBMODULE_NAMES))
endif
.PHONY: init-submodules
@@ -784,7 +784,7 @@ cls:
@echo -e "\n\n---\n\n"
jsc-check:
- @ls $(JSC_BASE_DIR) >/dev/null 2>&1 || (echo -e "Failed to access WebKit build. Please compile the WebKit submodule using the Dockerfile at $(shell pwd)/src/javascript/WebKit/Dockerfile and then copy from /output in the Docker container to $(JSC_BASE_DIR). You can override the directory via JSC_BASE_DIR. \n\n DOCKER_BUILDKIT=1 docker build -t bun-webkit $(shell pwd)/src/bun.js/WebKit -f $(shell pwd)/src/bun.js/WebKit/Dockerfile --progress=plain\n\n docker container create bun-webkit\n\n # Get the container ID\n docker container ls\n\n docker cp DOCKER_CONTAINER_ID_YOU_JUST_FOUND:/output $(JSC_BASE_DIR)" && exit 1)
+ @ls $(JSC_BASE_DIR) >/dev/null 2>&1 || (echo -e "Failed to access WebKit build. Please compile the WebKit submodule using the Dockerfile at $(shell pwd)/src/javascript/WebKit/Dockerfile and then copy from /output in the Docker container to $(JSC_BASE_DIR). You can override the directory via JSC_BASE_DIR. \n\n DOCKER_BUILDKIT=1 docker build -t bun-webkit $(shell pwd)/WebKit -f $(shell pwd)/WebKit/Dockerfile --progress=plain\n\n docker container create bun-webkit\n\n # Get the container ID\n docker container ls\n\n docker cp DOCKER_CONTAINER_ID_YOU_JUST_FOUND:/output $(JSC_BASE_DIR)" && exit 1)
@ls $(JSC_INCLUDE_DIR) >/dev/null 2>&1 || (echo "Failed to access WebKit include directory at $(JSC_INCLUDE_DIR)." && exit 1)
@ls $(JSC_LIB) >/dev/null 2>&1 || (echo "Failed to access WebKit lib directory at $(JSC_LIB)." && exit 1)
@@ -932,7 +932,7 @@ jsc-bindings: headers bindings
.PHONY: clone-submodules
clone-submodules:
- git -c submodule."src/bun.js/WebKit".update=none submodule update --init --recursive --depth=1 --progress
+ git -c submodule."WebKit".update=none submodule update --init --recursive --depth=1 --progress
.PHONY: headers
@@ -1286,7 +1286,7 @@ jsc-build-linux-compile-config:
$(WEBKIT_RELEASE_DIR)
# If you get "Error: could not load cache"
-# run rm -rf src/bun.js/WebKit/CMakeCache.txt
+# run rm -rf WebKit/CMakeCache.txt
.PHONY: jsc-build-linux-compile-build
jsc-build-linux-compile-build:
mkdir -p $(WEBKIT_RELEASE_DIR) && \
@@ -1306,7 +1306,7 @@ jsc-build-mac-copy:
cp $(WEBKIT_RELEASE_DIR)/lib/libbmalloc.a $(BUN_DEPS_OUT_DIR)/libbmalloc.a
clean-jsc:
- cd src/bun.js/WebKit && rm -rf **/CMakeCache.txt **/CMakeFiles && rm -rf src/bun.js/WebKit/WebKitBuild
+ cd WebKit && rm -rf **/CMakeCache.txt **/CMakeFiles && rm -rf WebKit/WebKitBuild
clean-bindings:
rm -rf $(OBJ_DIR)/*.o $(DEBUG_OBJ_DIR)/*.o $(DEBUG_OBJ_DIR)/webcore/*.o $(DEBUG_BINDINGS_OBJ) $(OBJ_DIR)/webcore/*.o $(BINDINGS_OBJ) $(OBJ_DIR)/*.d $(DEBUG_OBJ_DIR)/*.d
diff --git a/docs/project/development.md b/docs/project/development.md
index c253b4381..3f82180b7 100644
--- a/docs/project/development.md
+++ b/docs/project/development.md
@@ -395,7 +395,7 @@ On branch my-branch
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git restore <file>..." to discard changes in working directory)
- modified: src/bun.js/WebKit (new commits)
+ modified: WebKit (new commits)
```
For performance reasons, `make submodule` does not automatically update the WebKit submodule. To update, run the following commands from the root of the Bun repo:
@@ -411,7 +411,7 @@ $ make cpp
<!--
```bash
-$ cd src/bun.js/WebKit
+$ cd WebKit
$ git fetch
$ git checkout <hash>
``` -->
diff --git a/docs/upgrading-webkit.md b/docs/upgrading-webkit.md
index e726fb1d8..32800e56f 100644
--- a/docs/upgrading-webkit.md
+++ b/docs/upgrading-webkit.md
@@ -10,7 +10,7 @@ It's important to periodically update WebKit for many reasons:
To upgrade, first find the commit in **Bun's WebKit fork** (not Bun!) between when we last upgraded and now.
```bash
-$ cd src/bun.js/WebKit # In the WebKit directory! not bun
+$ cd WebKit # In the WebKit directory! not bun
$ git checkout $COMMIT
```
@@ -36,7 +36,7 @@ Make sure that JSC's CLI is able to load successfully. This verifies that the bu
You know this worked when it printed help options. If it complains about symbols, crashes, or anything else that looks wrong, something is wrong.
```bash
-src/bun.js/WebKit/WebKitBuild/Release/bin/jsc --help
+WebKit/WebKitBuild/Release/bin/jsc --help
```
Then, clear out our bindings and regenerate the C++<>Zig headers:
diff --git a/packages/bun-inspector-frontend/build.ts b/packages/bun-inspector-frontend/build.ts
index b45a3549f..8cbf6666c 100644
--- a/packages/bun-inspector-frontend/build.ts
+++ b/packages/bun-inspector-frontend/build.ts
@@ -3,11 +3,11 @@ import { copyFileSync, mkdirSync, readdirSync, rmSync, statSync } from "fs";
import { join } from "path";
try {
- const basePath = join(import.meta.dir, "../../src/bun.js/WebKit/Source/WebInspectorUI/UserInterface");
+ const basePath = join(import.meta.dir, "../../WebKit/Source/WebInspectorUI/UserInterface");
const htmlPath = join(basePath, "Main.html");
const backendCommands = join(
import.meta.dir,
- "../../src/bun.js/WebKit/WebKitBuild/Release/JavaScriptCore/DerivedSources/inspector/InspectorBackendCommands.js",
+ "../../WebKit/WebKitBuild/Release/JavaScriptCore/DerivedSources/inspector/InspectorBackendCommands.js",
);
const scriptsToBundle = [];
const stylesToBundle = [];
diff --git a/tsconfig.json b/tsconfig.json
index e8b7322b4..39b67721b 100644
--- a/tsconfig.json
+++ b/tsconfig.json
@@ -15,7 +15,7 @@
"test",
"src/deps",
"bun-webkit",
- "src/bun.js/WebKit",
+ "WebKit",
"src/api/demo",
"node_modules"
],