Skip to content
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

Update to Kotlin 1.9.20 + add Wasm #76

Merged
merged 1 commit into from
Nov 15, 2023
Merged

Update to Kotlin 1.9.20 + add Wasm #76

merged 1 commit into from
Nov 15, 2023

Conversation

serras
Copy link
Member

@serras serras commented Nov 9, 2023

This way we can add a new shiny WebAssembly target to Arrow

Furthermore, I've realized that we have several cases of duplicated code between JS and Native. Instead of adding yet another duplication with Wasm, I've added a nonJvmMain source set to gather all those.

Copy link
Member

@raulraja raulraja left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great @serras, thank you!

Something I'm not convinced of KMP in general is that we are exporting binaries to all these platforms such as JS, WasmJS, Native etc for years now but I'm yet to see an example of Arrow in other platforms that are not Android or the JVM.

For what I can see KMP is useful when your target lang in those platforms is also Kotlin but none of the libraries exported to JS, are usable from the main langs on those platforms.

Do we have any examples of what it looks like to consume Arrow from TS, JS or any of those languages? How do suspend functions work if they do at all? . Our last tests in xef.ai show features like suspend don't work even when you use @JSExport and similar.

@serras
Copy link
Member Author

serras commented Nov 10, 2023

I don't think Arrow suits a lot into something to be consumed by JS or TS, since you have native libraries doing similar things in those ecosystems. My point of view is that we should support those platforms so that people using KMP in them can also use Arrow in the Kotlin portion.

This is just a drop in the ocean, but one of my personal projects, https://deck.run/, compiles to JS from Kotlin, and uses Arrow. This wouldn't have been possible had we not published the JS versions of the libraries.

@serras
Copy link
Member Author

serras commented Nov 11, 2023

If you think this is correct, could you also generate a release, so we can then release the new 1.2.x version of Arrow with WebAssembly support? @raulraja @nomisRev

Copy link
Member

@nomisRev nomisRev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I agree with what you've mentioned @serras! Let's merge and get this in Arrow 💪

@serras serras merged commit e8e6bd0 into main Nov 15, 2023
1 check passed
@serras serras deleted the serras/1-9-20-wasm branch November 15, 2023 11:41
@serras
Copy link
Member Author

serras commented Nov 15, 2023

Merged! Could anybody make a new release, so we can update the dependency?

@nomisRev
Copy link
Member

Merged! Could anybody make a new release, so we can update the dependency?

Do you not have the right permissions? 🤔 I'm on it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants