Skip to content

Wasm Support - #354

Open
DatL4g wants to merge 1 commit into
MayakaApps:mainfrom
DatL4g:main
Open

Wasm Support#354
DatL4g wants to merge 1 commit into
MayakaApps:mainfrom
DatL4g:main

Conversation

@DatL4g

@DatL4g DatL4g commented Jul 17, 2025

Copy link
Copy Markdown

Adds wasm support for the core module.
You need to update the publishing btw as sonatype has been shutdown.

Fixes #331

@azevio

azevio commented Jul 1, 2026

Copy link
Copy Markdown

Any update?

@DatL4g

DatL4g commented Jul 1, 2026

Copy link
Copy Markdown
Author

@azevio I don't think this repository is maintained anymore.

The last "real" commit has been in February 2025, all other changes are automated dependency bumps which never got released.

I created my own cache library, which is the only one comparable with Kache in speed (as far as I know) and also fixes some problems like crashes and stalls Kache causes. (#239)
Additionally it comes with nice Kotlin features, like proper getter and setter handling as well as AutoClosable inheritance. (#335)

However it's currently limited to InMemoryCache and does not support File-based caching.

You can read more here: https://datlag.dev/projects/cache/

@azevio

azevio commented Jul 2, 2026

Copy link
Copy Markdown

@DatL4g Thanks for sharing your library! I appreciate the recommendation.

I'll use it for in-memory caching. I'm also looking forward to a file-based implementation, especially if it's built on kotlinx-io, as that's an important requirement for my use case.

@DatL4g

DatL4g commented Jul 2, 2026

Copy link
Copy Markdown
Author

@azevio thank you for consideration!

I am already planning file-based caching and Ktor support.

Out of curiosity why kotlinx-io and not Okio?
Are there special features or limitations which are important to you?

@azevio

azevio commented Jul 7, 2026

Copy link
Copy Markdown

@DatL4g
Sorry for the delayed reply.

The main reason is that one of the requirements for the project is to gradually move away from third-party libraries whenever Kotlin provides a suitable built-in alternative. Since "kotlinx-io" is part of the Kotlin ecosystem, it aligns better with that long-term direction.

This isn't a criticism of Okio which is a great library but in this case the project aims to minimize external dependencies where practical.

@DatL4g

DatL4g commented Jul 15, 2026

Copy link
Copy Markdown
Author

@azevio thanks for the information, I was just curious, if there is a specific reason.

We finished implementing file based caching as well as ktor client cache support now.
During the research for the underlying filesystem library we looked for a couple of factors like popularity, features, target completness etc, and thats why I asked.

However we also went for kotlinx-io as its API aligns much better with the features we wanted to provide.

Overall our cache libraries have the following dependencies in case you want to know:

Core (InMemoryCache)

  • androidx.collection
  • atomicfu
  • coroutines

File

  • core the core module
  • kotlinx-io

Ktor

  • file the file based cache module
  • ktor-client-core

And some testing dependencies of course which aren't included in the release package.

Documentation

Our documentation will be updated soon with the new modules and features.
For now we already attached some benchmarks for the InMemoryCache.

https://datlag.dev/projects/cache/

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.

WASM Support

2 participants