-
Notifications
You must be signed in to change notification settings - Fork 165
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add wasmJs target for kotlin-node
wrappers
#2170
Comments
What is your use case? |
@turansky I'm creating a KMP class which starts child process in different targets. It supports kotlin/js and uses
from kotlin-wrappers. |
I'm also looking for WASM interop with Node.js modules. @Suppress("UNUSED_PARAMETER")
private fun readFileSync(name: String): String =
js(
"""
{
const fs = require('fs');
return fs.readFileSync(name, {
encoding: 'utf8'
});
}
"""
)
public actual fun readBenchmarkFile(name: String): String =
readFileSync("$basePath$name") |
Why |
@turansky because I'm waiting for kotlin-wrappers to offer external types 😆 |
I personally use following scripts Script "I don't need fine externals"
Script "I need fine externals"
|
I think the main point here is kotlin-wrappers already have those externals, so why rewrite them? We should find a way to share them between the |
Because they aren't compatible with
If you need all Node.js declarations probably Kotlin/JS is what you need? :) |
I don't need all of them, but I guess being WASM is interoperable with JS, people will adopt it by moving incrementally, only some bits, while still calling JS-first APIs.
That's true. Looks like on WASM, external JS types must derive from |
wasmJs
KMP target became available in NodeJs. This is a proposal to makekotlin-node
wrappers available on this new target.The text was updated successfully, but these errors were encountered: