File tree 2 files changed +14
-1
lines changed 2 files changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -427,7 +427,11 @@ export class RufflePlayer extends HTMLElement {
427
427
this ,
428
428
config
429
429
) ;
430
- console . log ( "New Ruffle instance created." ) ;
430
+ console . log (
431
+ "New Ruffle instance created (WebAssembly extensions: " +
432
+ ( ruffleConstructor . is_wasm_simd_used ( ) ? "ON" : "OFF" ) +
433
+ ")"
434
+ ) ;
431
435
432
436
// In Firefox, AudioContext.state is always "suspended" when the object has just been created.
433
437
// It may change by itself to "running" some milliseconds later. So we need to wait a little
Original file line number Diff line number Diff line change @@ -454,6 +454,15 @@ impl Ruffle {
454
454
} )
455
455
. unwrap_or_default ( )
456
456
}
457
+
458
+ /// Returns whether the `simd128` target feature was enabled at build time.
459
+ /// This is intended to discriminate between the two WebAssembly module
460
+ /// versions, one of which uses WebAssembly extensions, and the other one
461
+ /// being "vanilla". `simd128` is used as proxy for most extensions, since
462
+ /// no other WebAssembly target feature is exposed to `cfg!`.
463
+ pub fn is_wasm_simd_used ( ) -> bool {
464
+ cfg ! ( target_feature = "simd128" )
465
+ }
457
466
}
458
467
459
468
impl Ruffle {
You can’t perform that action at this time.
0 commit comments