-
Notifications
You must be signed in to change notification settings - Fork 23
Incremental steps to support Android XR #115
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
matthargett
wants to merge
51
commits into
BabylonJS:main
Choose a base branch
from
rebeckerspecialties:update-jsruntimehost-for-android-xr-compatibility
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 38 commits
Commits
Show all changes
51 commits
Select commit
Hold shift + click to select a range
79e03c1
Update Android build to NDK 28 and system V8
matthargett 43d677a
Improve Android V8 header discovery
matthargett 22d1f96
Improve Android V8 header hint coverage
matthargett 435c798
Improve Android V8 discovery for SDK 35
matthargett e1d0f2f
Log Android V8 search hints and broaden header discovery
matthargett dbef5ba
Force Android builds to use NDK r28c and API 35
matthargett 1159300
Relax Android NDK version guard
matthargett 39f1536
Pin Gradle NDK wiring to r28c
matthargett 82b17e8
Improve Android NDK detection for Android tests
matthargett 2dd6185
Simplify Android NDK environment configuration
matthargett 98c40b5
Fix(CI): Update Android CI to use NDK 28 and API 35
google-labs-jules[bot] 02a7dc5
Merge pull request #2 from rebeckerspecialties/feat/android-ci-update
matthargett 99c49b1
Fix(CI): Update Android CI to use NDK 28 and API 35
google-labs-jules[bot] a40c852
Revise tool requirements and Android version support
matthargett f98247a
New Java doesn't implicitly include bind support, we have to specify …
matthargett 7faff92
work around latent unsafe file descriptor issue that causes intermitt…
matthargett b3480ca
fix the C++20 libc++ deprecation issue more elegantly
matthargett 118450b
pull in the already-existing upstream fix for compatiblity with newer…
matthargett 4d9eb96
revert to using third aprty prebuilt v8 so we can test things more in…
matthargett e5e5648
fix another fdsan-found issue that causes intermittent crashes on exit
matthargett d205c4a
Add tests for updated JS capabilities from newer JSC. This has an apk…
matthargett 4633fa3
JSC's results deviate from the standard. for now, let's capture both …
matthargett 465685e
Use latest Java LTS so that modern commandline options are available,…
matthargett fcc3ce1
skip tests Chakra doesn't support only on win32. Chakra support is ho…
matthargett c1fdff4
See if reducing resource usage of the simulator helps solve the timin…
matthargett a54a121
Give more specific failure information when tests fail in the device …
matthargett be1baf6
some of these tests won't work on jsc-android
matthargett a6a258d
it was worth a try to test this functionality, so that Babylon Native…
matthargett b9aa23c
properly polyfill globalThis. add inline sourcemaps to tests so that …
matthargett 27eed75
try a more resilient way of getting globalThis on v8 that doesn't cau…
matthargett 9a268bb
retry websocket tests in case public echo server (or routes) are down…
matthargett 56be206
The reason we called the log directly is because fdsan (file descript…
matthargett f378d3f
A race can occur in CI where the boot is completed, but package insta…
matthargett ed53fd9
I keep hitting totally unrelated CI flakiness. This time, it's that t…
matthargett 863f962
Update README.md
matthargett 2e467dd
Update README.md
matthargett 84005c0
PR feedback
matthargett 9e3cfc9
now that Azure pipeline uses JDK 18, we don't need this original work…
matthargett 98e80ef
fix wrong abi being forced. pull in AndroidExtensiosn bug fix branch.
matthargett 499ae36
I simply cannot get address sanitizer to run well under Android simul…
matthargett 51f1f45
fix macOS build of unit tests, enable sanitizers. they are finding bu…
matthargett 496c67f
don't put build/bundle artifacts in the source dir, put them in build…
matthargett 403b452
make globalThis test using ifdefs in consistent way with other skippe…
matthargett 5253492
the existing tests crash under address sanitizer when skipping a test…
matthargett ebf6950
fix test failure that was an issue in the test rather than the implem…
matthargett cfb1af6
this is a change that should be contributed to upstream node-api -- b…
matthargett d30f735
fix ubsan identified issue with invalid nan conversion. great bug to …
matthargett d23737f
Merge branch 'main' of github.com:BabylonJS/JsRuntimeHost into update…
matthargett ada4a17
merge
matthargett 56c1f3e
minor cleanup
matthargett 04bcc75
use latest upstream hash to fix compile error .don't put things in th…
matthargett File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -14,7 +14,7 @@ schedules: | |
|
|
||
| variables: | ||
| - name: ndkVersion | ||
| value: 25.2.9519653 | ||
| value: 28.2.13676358 | ||
|
|
||
| jobs: | ||
| # WIN32 | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1,2 @@ | ||
| /Build | ||
| /Tests/UnitTests/dist/ | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -19,6 +19,22 @@ struct napi_callback_info__ { | |
| }; | ||
|
|
||
| namespace { | ||
| // Minimal char_traits-like helper for JSChar (unsigned short) to compute string length at compile time | ||
|
||
| template<typename CharT> | ||
| struct jschar_traits; | ||
|
|
||
| template<> | ||
| struct jschar_traits<JSChar> { | ||
| using char_type = JSChar; | ||
|
|
||
| static constexpr size_t length(const char_type* str) noexcept { | ||
| if (!str) return 0; | ||
| const char_type* s = str; | ||
| while (*s) ++s; | ||
| return s - str; | ||
| } | ||
| }; | ||
|
|
||
| class JSString { | ||
| public: | ||
| JSString(const JSString&) = delete; | ||
|
|
@@ -33,7 +49,7 @@ namespace { | |
| } | ||
|
|
||
| JSString(const JSChar* string, size_t length = NAPI_AUTO_LENGTH) | ||
| : _string{JSStringCreateWithCharacters(string, length == NAPI_AUTO_LENGTH ? std::char_traits<JSChar>::length(string) : length)} { | ||
| : _string{JSStringCreateWithCharacters(string, length == NAPI_AUTO_LENGTH ? jschar_traits<JSChar>::length(string) : length)} { | ||
| } | ||
|
|
||
| ~JSString() { | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,5 @@ | ||
| { | ||
| "dependencies": { | ||
| "jsc-android": "250231.0.0" | ||
| "jsc-android": "294992.0.0" | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -10,7 +10,7 @@ polyfills that consumers can include if required. | |
|
|
||
| ## **Building - All Development Platforms** | ||
|
|
||
| **Required Tools:** [git](https://git-scm.com/), [CMake](https://cmake.org/), [node.js](https://nodejs.org/en/) | ||
| **Required Tools:** [git](https://git-scm.com/), [CMake 3.29 or newer](https://cmake.org/), [node.js 20.x or newer](https://nodejs.org/en/) | ||
|
|
||
| The first step for all development environments and targets is to clone this repository. | ||
|
|
||
|
|
@@ -32,9 +32,9 @@ npm install | |
| _Follow the steps from [All Development Platforms](#all-development-platforms) before proceeding._ | ||
|
|
||
| **Required Tools:** | ||
| [Android Studio](https://developer.android.com/studio), [Node.js](https://nodejs.org/en/download/), [Ninja](https://ninja-build.org/) | ||
| [Android Studio](https://developer.android.com/studio) with Android NDK 28.2.13676358 and API level 35 SDK platforms installed, [Node.js 20.x or newer](https://nodejs.org/en/download/), [Ninja](https://ninja-build.org/) | ||
|
|
||
| The minimal requirement target is Android 5.0. | ||
| The minimal requirement target is Android 10.0, which has [~95%](https://gs.statcounter.com/android-version-market-share/mobile-tablet/worldwide) active device coverage globally. Android 10 support covers Meta Quest 1 (and newer), HTC Vive Focus 2 (and newer), and Pico 3 (and newer). | ||
|
|
||
| Only building with Android Studio is supported. CMake is not used directly. Instead, Gradle | ||
| is used for building and CMake is automatically invocated for building the native part. | ||
|
|
@@ -68,4 +68,4 @@ Security Response Center (MSRC) at [[email protected]](mailto:secure@microsof | |
| You should receive a response within 24 hours. If for some reason you do not, please | ||
| follow up via email to ensure we received your original message. Further information, | ||
| including the [MSRC PGP](https://technet.microsoft.com/en-us/security/dn606155) key, can | ||
| be found in the [Security TechCenter](https://technet.microsoft.com/en-us/security/default). | ||
| be found in the [Security TechCenter](https://technet.microsoft.com/en-us/security/default). | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know if this is from your PR, but we typically avoid generating files in the source tree. Generated files should go in the CMake binary folder which we typically put in
Build.