I鈥檇 love to see http4s on https://index.scala-lang.org/search?q=*&targetTypes=Native and https://github.com/tindzk/awesome-scala-native. Looks like scalaz is already Scala Native-ready. :)
We depend heavily on the cats part of the ecosystem, and cats itself is not running in Scala Native yet.
This issue is tracking the progress: https://github.com/typelevel/cats/issues/1549
Just out of curiosity, what use case would you see for this? :)
I found a need to write a CLI utility yesterday that, among other things, fetches a bunch of web pages in one go. Fetching them serially was out of the question for performance reasons, but Bash/Zsh/etc. doesn鈥檛 easily support parallel curl, and especially doesn鈥檛 easily support asynchronous logic such as first-one-wins.
I ended up staying up til the wee hours of the morning slapping something together in Bash, but I鈥檓 sure it would鈥檝e been easier (and more pleasant!) writing it in Scala. I imagine such a library would be helpful for any Scala Native CLI utility that needs to access the web.
The necessary dependency chain is cats -> cats-effect -> fs2 -> http4s. It's still on step one, but, well, maybe someday. :)
Piggybacking on @jcranky's remark, it would work iff enough of java's primitives are translated to support what we need in scala-native (I assume yeah, but still).
From what I gather here, it seems the majority of stuff from java.concurrent have been translated, so it's possible blaze would work. We'll have to see, but a starting point would be trying to compile blaze for scala-native.
That said, I do want to point out that this _is_ project tax. Multi-platform compiles (scalajs/native) are a tax on the project to maintain, so it's a thing to consider whether the use case is worth it.
Most helpful comment
I found a need to write a CLI utility yesterday that, among other things, fetches a bunch of web pages in one go. Fetching them serially was out of the question for performance reasons, but Bash/Zsh/etc. doesn鈥檛 easily support parallel curl, and especially doesn鈥檛 easily support asynchronous logic such as first-one-wins.
I ended up staying up til the wee hours of the morning slapping something together in Bash, but I鈥檓 sure it would鈥檝e been easier (and more pleasant!) writing it in Scala. I imagine such a library would be helpful for any Scala Native CLI utility that needs to access the web.