Márton Matusek
10/31/2024, 1:54 PMCryptographyprovider.Default
companion object property.
The following line should register the WebCrypto provider on the JS platform:
https://github.com/whyoleg/cryptography-kotlin/blob/69b77a88b4b81109704475ed02be48[…]webcrypto/src/jsMain/kotlin/WebCryptoCryptographyProvider.js.kt
Can it happen that the initHook
variable is optimised out by the compiler during DCE because it is not used in our code? Once I call CryptographyProvider.WebCrypto
, the error disappears.
If this is the case, what shouldn't the initHook
variable be replaced with a main function or some other alternative? Thank you!Márton Matusek
10/31/2024, 1:55 PMOleg Yukhnevich
10/31/2024, 5:41 PMinitHook
variable is optimised out by the compiler during DCE
Probably this is the reason - I think it's possible to check produced by compiler JS files to check if it's really removed or just not called
I will try to investigate this on weekend, but probably it's an issue in Kotlin Compiler regarding handling of EagerInitialization
Márton Matusek
11/04/2024, 8:23 AMArtem Kobzar
11/06/2024, 2:19 PMMárton Matusek
11/07/2024, 8:55 AMArtem Kobzar
11/07/2024, 11:48 AMOleg Yukhnevich
11/08/2024, 1:11 PMOleg Yukhnevich
11/08/2024, 4:37 PMMárton Matusek
11/13/2024, 8:02 AM