Comments (7)
#24 is merged, CI/CD is done and the fix is available in 0.8.6-SNAPSHOT version. Thanks for the contribution that fixed the issue!
from kotlin-multiplatform-libsodium.
Hi @luca992 , libsodium sumo is the js release of the libsodium library (sumo being the one with more primitives available), and without seeing exactly how you are packaging the final artifacts I don't think I can help, although I'm not an JavaScript expert so even with seeing the way you build the final artifacts I might not be able to help.
You might be right it has to do with webpack 5, I have the following line in my projects gradle.properties
to set the webpack to 4:
kotlin.js.webpack.major.version=4
See if that helps.
If that solves the issue I'll add to documentation that webpack 4 is required, and I'll see if I can test with webpack 5 when I have some free time.
from kotlin-multiplatform-libsodium.
Didn't work.
But, I think the problem is how you get an instance of JsSodiumInterface?
I think JsSodiumInterface should be an external class annotated with @JsModule
: https://kotlinlang.org/docs/js-modules.html#jsmodule-annotation
is there any reason you get an instance with js("\$module\$libsodium_wrappers_sumo")
, I don't think that is standard practice?
from kotlin-multiplatform-libsodium.
is there any reason you get an instance with js("$module$libsodium_wrappers_sumo"), I don't think that is standard practice?
When I was writing this code intially @JsModule
didn't work and would actually fail with the undefined error.
I had to jump through a lot of hoops to get the js to work at all, the kotlin js compiler was unstable (at the time) and would fail in interesting and creative ways that it required a bunch of workarounds. I currently don't have time to experiment against latest kotlin js compiler, and in multiplatform projects that I am using the library in it works fine (for JS in my case that is browser flavor, I don't have node projects)
With that said, I'd be very happy to accept a pull request that improves this in any way!
from kotlin-multiplatform-libsodium.
Well, fixed it. 👍 #24
from kotlin-multiplatform-libsodium.
Not really sure how it works at all in it's current state in your project haha. Calling ready just didn't work at all for me before the module fix I made
from kotlin-multiplatform-libsodium.
Awesome, thank you very much for the contribution, I'll give it a look, run the tests and get back to you.
from kotlin-multiplatform-libsodium.
Related Issues (16)
- Typo in README.md HOT 1
- Adding dependency in `commonMain` doesn't work the JS legacy target HOT 2
- Release libsodium bindings 0.1.0 HOT 1
- Wrong Libsodium function in Signature.ed25519PkToCurve25519 HOT 5
- Unable to run tests on jvm target in project that includes this library HOT 4
- nativeMain build error (commonMain -> mingwX64 native HOT 8
- Add documentation to libsodium bindings API
- android minSDK level HOT 1
- Linker error running on iPhone Simulator x86_64 using 0.8.8 HOT 7
- is this compatible with updating GitHub org secrets? HOT 2
- Production readiness HOT 1
- Implement JNA wrapper for libsodium HOT 1
- bindings also for wasmJS target HOT 3
- Libsodium return values aren't checked in some (many) places HOT 2
- Finite Field Artithmetic not implemented? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from kotlin-multiplatform-libsodium.