-
-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bump,enable(main/{librusty-v8,deno}): librusty-v8 130.0.1, deno 2.1.1
- Loading branch information
Showing
12 changed files
with
167 additions
and
151 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains 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 |
---|---|---|
@@ -0,0 +1,13 @@ | ||
diff --git a/ext/ffi/Cargo.toml b/ext/ffi/Cargo.toml | ||
index 2f0813a58..fda6e2469 100644 | ||
--- a/ext/ffi/Cargo.toml | ||
+++ b/ext/ffi/Cargo.toml | ||
@@ -18,7 +18,7 @@ deno_core.workspace = true | ||
deno_permissions.workspace = true | ||
dlopen2.workspace = true | ||
dynasmrt = "1.2.3" | ||
-libffi = "=3.2.0" | ||
+libffi = { version = "=3.2.0", features = ["system"] } | ||
libffi-sys = "=2.3.0" | ||
log.workspace = true | ||
num-bigint.workspace = true |
This file contains 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 |
---|---|---|
@@ -0,0 +1,29 @@ | ||
diff --git a/cli/tools/upgrade.rs b/cli/tools/upgrade.rs | ||
index cb85859f7..891ebb0e2 100644 | ||
--- a/cli/tools/upgrade.rs | ||
+++ b/cli/tools/upgrade.rs | ||
@@ -480,6 +480,7 @@ async fn fetch_and_store_latest_version< | ||
env.write_check_file(&version_file.serialize()); | ||
} | ||
|
||
+#[cfg(not(target_os = "android"))] | ||
pub async fn upgrade( | ||
flags: Arc<Flags>, | ||
upgrade_flags: UpgradeFlags, | ||
@@ -612,6 +613,16 @@ pub async fn upgrade( | ||
Ok(()) | ||
} | ||
|
||
+#[cfg(target_os = "android")] | ||
+pub async fn upgrade( | ||
+ flags: Arc<Flags>, | ||
+ upgrade_flags: UpgradeFlags, | ||
+) -> Result<(), AnyError> { | ||
+ log::error!("You are currently using Deno packaged by the Termux repo. Upgrading Deno via CLI will cause an issue to installed Deno. Wait for an update on Deno package in the Termux repo to upgrade."); | ||
+ deno_runtime::exit(1); | ||
+} | ||
+ | ||
+ | ||
#[derive(Debug, PartialEq)] | ||
enum RequestedVersion { | ||
Latest(ReleaseChannel), |
This file contains 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 |
---|---|---|
@@ -0,0 +1,22 @@ | ||
TERMUX_PKG_HOMEPAGE=https://deno.land/ | ||
TERMUX_PKG_DESCRIPTION="A modern runtime for JavaScript and TypeScript" | ||
TERMUX_PKG_LICENSE="MIT" | ||
TERMUX_PKG_MAINTAINER="@termux" | ||
TERMUX_PKG_VERSION=2.1.1 | ||
TERMUX_PKG_SRCURL=git+https://github.com/denoland/deno | ||
TERMUX_PKG_DEPENDS="glib" | ||
TERMUX_PKG_BUILD_IN_SRC=true | ||
|
||
termux_step_configure() { | ||
termux_setup_rust | ||
termux_setup_cmake | ||
termux_setup_protobuf | ||
} | ||
|
||
termux_step_make() { | ||
cargo build -vv --jobs "${TERMUX_PKG_MAKE_PROCESSES}" --target "${CARGO_TARGET_NAME}" --release | ||
} | ||
|
||
termux_step_make_install() { | ||
install -Dm700 -t "${TERMUX_PREFIX}/bin" "target/${CARGO_TARGET_NAME}/release/gleam" | ||
} |
This file contains 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 |
---|---|---|
@@ -0,0 +1,28 @@ | ||
--- a/src/binding.cc | ||
+++ b/src/binding.cc | ||
@@ -54,6 +54,7 @@ | ||
|
||
static_assert(sizeof(v8::Locker) == sizeof(size_t) * 2, "Locker size mismatch"); | ||
|
||
+#if !(defined(__ANDROID__) && defined(__i386__)) | ||
static_assert(sizeof(v8::ScriptCompiler::CompilationDetails) == | ||
sizeof(int64_t) * 3, | ||
"CompilationDetails size mismatch"); | ||
@@ -66,6 +67,17 @@ | ||
align_to<int64_t>(sizeof(size_t)) + | ||
sizeof(v8::ScriptCompiler::CompilationDetails)), | ||
"Source size mismatch"); | ||
+#else | ||
+static_assert(sizeof(v8::ScriptCompiler::CompilationDetails) == | ||
+ sizeof(int64_t) * 2 + sizeof(uint32_t) /* enum class */, | ||
+ "CompilationDetails size mismatch"); | ||
+ | ||
+static_assert( | ||
+ sizeof(v8::ScriptCompiler::Source) == | ||
+ align_to<size_t>(sizeof(size_t) * 8 + sizeof(int) * 3 + | ||
+ sizeof(v8::ScriptCompiler::CompilationDetails)), | ||
+ "Source size mismatch"); | ||
+#endif | ||
|
||
static_assert(sizeof(v8::FunctionCallbackInfo<v8::Value>) == sizeof(size_t) * 3, | ||
"FunctionCallbackInfo size mismatch"); |
This file contains 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 |
---|---|---|
@@ -0,0 +1,20 @@ | ||
--- a/build.rs | ||
+++ b/build.rs | ||
@@ -259,11 +259,17 @@ | ||
"x64" | ||
} else if target_arch == "aarch64" { | ||
"arm64" | ||
+ } else if target_arch == "arm" { | ||
+ "arm" | ||
+ } else if target_triple.starts_with("i686-") { | ||
+ "x86" | ||
} else { | ||
"unknown" | ||
}; | ||
if target_arch == "x86_64" { | ||
maybe_install_sysroot("amd64"); | ||
+ } else if target_triple.starts_with("i686-") { | ||
+ maybe_install_sysroot("i386"); | ||
} | ||
gn_args.push(format!(r#"v8_target_cpu="{}""#, arch).to_string()); | ||
gn_args.push(format!(r#"target_cpu="{}""#, arch).to_string()); |
This file contains 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 |
---|---|---|
@@ -0,0 +1,51 @@ | ||
TERMUX_PKG_HOMEPAGE=https://github.com/denoland/rusty_v8 | ||
TERMUX_PKG_DESCRIPTION="High quality Rust bindings to V8's C++ API" | ||
TERMUX_PKG_LICENSE="MIT" | ||
TERMUX_PKG_MAINTAINER="@termux" | ||
TERMUX_PKG_VERSION=130.0.1 | ||
TERMUX_PKG_SRCURL=git+https://github.com/denoland/rusty_v8 | ||
TERMUX_PKG_BUILD_IN_SRC=true | ||
TERMUX_PKG_NO_STATICSPLIT=true | ||
|
||
termux_step_configure() { | ||
termux_setup_rust | ||
termux_setup_ninja | ||
termux_setup_gn | ||
|
||
export EXTRA_GN_ARGS=" | ||
android32_ndk_api_level=$TERMUX_PKG_API_LEVEL | ||
android64_ndk_api_level=$TERMUX_PKG_API_LEVEL | ||
android_ndk_root=\"$NDK\" | ||
android_ndk_version=\"$TERMUX_NDK_VERSION\" | ||
" | ||
|
||
if [ "$TERMUX_ARCH" = "arm" ]; then | ||
EXTRA_GN_ARGS+=" target_cpu = \"arm\"" | ||
EXTRA_GN_ARGS+=" v8_target_cpu = \"arm\"" | ||
EXTRA_GN_ARGS+=" arm_arch = \"armv7-a\"" | ||
EXTRA_GN_ARGS+=" arm_float_abi = \"softfp\"" | ||
fi | ||
|
||
# shellcheck disable=SC2155 # Ignore command exit-code | ||
export GN="$(command -v gn)" | ||
|
||
# Make build.rs happy | ||
ln -sf "$NDK" "$TERMUX_PKG_SRCDIR"/third_party/android_ndk | ||
|
||
BINDGEN_EXTRA_CLANG_ARGS="--target=$CCTERMUX_HOST_PLATFORM" | ||
BINDGEN_EXTRA_CLANG_ARGS+=" --sysroot=$TERMUX_PKG_SRCDIR/third_party/android_ndk/toolchains/llvm/prebuilt/linux-x86_64/sysroot" | ||
export BINDGEN_EXTRA_CLANG_ARGS | ||
local env_name=BINDGEN_EXTRA_CLANG_ARGS_${CARGO_TARGET_NAME@U} | ||
env_name=${env_name//-/_} | ||
export "$env_name"="$BINDGEN_EXTRA_CLANG_ARGS" | ||
} | ||
|
||
termux_step_make() { | ||
export V8_FROM_SOURCE=1 | ||
cargo build -vv --jobs "${TERMUX_PKG_MAKE_PROCESSES}" --target "${CARGO_TARGET_NAME}" --release | ||
} | ||
|
||
termux_step_make_install() { | ||
install -Dm600 -t "${TERMUX_PREFIX}/include/librusty_v8" "target/${CARGO_TARGET_NAME}/release/gn_out/src_binding.rs" | ||
install -Dm600 -t "${TERMUX_PREFIX}/lib" "target/${CARGO_TARGET_NAME}/release/gn_out/obj/librusty_v8.a" | ||
} |
This file contains 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