You might have to run this multiple times.
JSTime uses a fork of WebKit with a small number of changes.
It’s important to periodically update WebKit for many reasons:
- Security
- Performance
- Compatibility
- …and many more.
To upgrade, first find the commit in JSTime’s WebKit fork (not JSTime!) between when we last upgraded and now.
$ cd src/jstime.js/WebKit # In the WebKit directory! not jstime$ git checkout $COMMITThis is the main command to run:
$ git pull https://github.com/WebKit/WebKit.git main --no-rebase --allow-unrelated-histories -X theirsThen, you will likely see some silly merge conflicts. Fix them and then run:
# You might have to run this multiple times.$ rm -rf WebKitBuild
# Go to JSTime's directory! Not WebKit.cd ../../../../make jsc-build-mac-compileMake sure that JSC’s CLI is able to load successfully. This verifies that the build is working.
You know this worked when it printed help options. If it complains about symbols, crashes, or anything else that looks wrong, something is wrong.
src/jstime.js/WebKit/WebKitBuild/Release/bin/jsc --helpThen, clear out our bindings and regenerate the C++<>Zig headers:
make clean-bindings headers builtinsNow update JSTime’s bindings wherever there are compiler errors:
# It will take awhile if you don't pass -j heremake bindings -j10This is the hard part. It might involve digging through WebKit’s commit history to figure out what changed and why. Fortunately, WebKit contributors write great commit messages.