Enable sparkplug. Also dealt with rusty_v8 breaking changes
OBS-URL: https://build.opensuse.org/package/show/devel:languages:javascript/deno?expand=0&rev=36
This commit is contained in:
parent
fc1a99c21c
commit
b52aede1a4
2
.gitattributes
vendored
2
.gitattributes
vendored
@ -21,3 +21,5 @@
|
||||
*.xz filter=lfs diff=lfs merge=lfs -text
|
||||
*.zip filter=lfs diff=lfs merge=lfs -text
|
||||
*.zst filter=lfs diff=lfs merge=lfs -text
|
||||
## Specific LFS patterns
|
||||
icudtl.dat filter=lfs diff=lfs merge=lfs -text
|
||||
|
@ -1,13 +1,53 @@
|
||||
diff --git a/core/runtime.rs.1 b/core/runtime.rs
|
||||
index 71aad8e..a806ecd 100644
|
||||
--- a/core/runtime.rs.1
|
||||
+++ b/core/runtime.rs
|
||||
@@ -145,7 +145,7 @@ fn v8_init(v8_platform: Option<v8::UniquePtr<v8::Platform>>) {
|
||||
@@ -140,16 +140,15 @@ impl Drop for JsRuntime {
|
||||
}
|
||||
}
|
||||
|
||||
-fn v8_init(v8_platform: Option<v8::UniquePtr<v8::Platform>>) {
|
||||
+fn v8_init(v8_platform: Option<v8::SharedRef<v8::Platform>>) {
|
||||
// Include 10MB ICU data file.
|
||||
#[repr(C, align(16))]
|
||||
struct IcuData([u8; 10413584]);
|
||||
- struct IcuData([u8; 10413584]);
|
||||
+ struct IcuData([u8; 10144432]);
|
||||
static ICU_DATA: IcuData = IcuData(*include_bytes!("icudtl.dat"));
|
||||
- v8::icu::set_common_data(&ICU_DATA.0).unwrap();
|
||||
+ v8::icu::set_common_data_69(&ICU_DATA.0).unwrap();
|
||||
|
||||
let v8_platform = v8_platform
|
||||
.unwrap_or_else(v8::new_default_platform)
|
||||
- .unwrap_or_else(v8::new_default_platform)
|
||||
- .unwrap();
|
||||
+ .unwrap_or_else(|| v8::new_default_platform(0, false).make_shared());
|
||||
v8::V8::initialize_platform(v8_platform);
|
||||
v8::V8::initialize();
|
||||
|
||||
@@ -159,9 +158,10 @@ fn v8_init(v8_platform: Option<v8::UniquePtr<v8::Platform>>) {
|
||||
// PumpMessageLoop and RunMicrotasks setup correctly.
|
||||
// See https://github.com/denoland/deno/issues/2544
|
||||
" --experimental-wasm-threads",
|
||||
- " --no-wasm-async-compilation",
|
||||
+ " --wasm-test-streaming",
|
||||
" --harmony-import-assertions",
|
||||
" --no-validate-asm",
|
||||
+ " --sparkplug",
|
||||
);
|
||||
v8::V8::set_flags_from_string(flags);
|
||||
}
|
||||
@@ -203,7 +203,7 @@ pub struct RuntimeOptions {
|
||||
|
||||
/// V8 platform instance to use. Used when Deno initializes V8
|
||||
/// (which it only does once), otherwise it's silenty dropped.
|
||||
- pub v8_platform: Option<v8::UniquePtr<v8::Platform>>,
|
||||
+ pub v8_platform: Option<v8::SharedRef<v8::Platform>>,
|
||||
|
||||
/// Create a V8 inspector and attach to the runtime.
|
||||
pub attach_inspector: bool,
|
||||
@@ -1966,7 +1966,7 @@ main();
|
||||
#[test]
|
||||
fn test_v8_platform() {
|
||||
let options = RuntimeOptions {
|
||||
- v8_platform: Some(v8::new_default_platform()),
|
||||
+ v8_platform: Some(v8::new_default_platform(0, false).make_shared()),
|
||||
..Default::default()
|
||||
};
|
||||
let mut runtime = JsRuntime::new(options);
|
||||
|
@ -1,7 +1,9 @@
|
||||
-------------------------------------------------------------------
|
||||
Sun Jul 4 05:16:39 UTC 2021 - Avindra Goolcharan <avindra@opensuse.org>
|
||||
|
||||
- pass --sparkplug v8 flag
|
||||
- added ff-serde.patch
|
||||
- rework deno-69.patch with more breaking changes
|
||||
- manually update serde_v8 to 0.8.0 in vendor tarball
|
||||
|
||||
-------------------------------------------------------------------
|
||||
|
@ -27,6 +27,8 @@ Group: Productivity/Other
|
||||
URL: https://github.com/denoland/deno
|
||||
Source0: %{name}-%{version}.tar.xz
|
||||
Source1: vendor.tar.xz
|
||||
# new icu data file
|
||||
Source2: https://github.com/denoland/deno/raw/main/core/icudtl.dat
|
||||
Source99: revendor_source.sh
|
||||
Patch0: deno-69.patch
|
||||
Patch1: ff-serde.patch
|
||||
@ -64,6 +66,8 @@ updated with the --reload flag.
|
||||
%autosetup -a1 -p1
|
||||
%define cargo_registry $(pwd)/vendor
|
||||
%{cargo_prep}
|
||||
# refresh icu data file
|
||||
cp %{SOURCE2} ./core
|
||||
|
||||
%build
|
||||
export V8_FROM_SOURCE=1
|
||||
|
3
icudtl.dat
Normal file
3
icudtl.dat
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:61e97c20d3f01ed4e18ad2b38b66c0b8122b31f9fb8cd71bddcdb1d22f164193
|
||||
size 10144432
|
Loading…
Reference in New Issue
Block a user