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

Scala Native support #1689

Closed
danielyli opened this issue Mar 7, 2018 · 6 comments
Closed

Scala Native support #1689

danielyli opened this issue Mar 7, 2018 · 6 comments
Labels
enhancement Feature requests and improvements

Comments

@danielyli
Copy link

I’d 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. :)

@aeons
Copy link
Member

aeons commented Mar 7, 2018

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: typelevel/cats#1549

@jcranky
Copy link
Contributor

jcranky commented Mar 7, 2018

Just out of curiosity, what use case would you see for this? :)

@danielyli
Copy link
Author

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’t easily support parallel curl, and especially doesn’t 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’m sure it would’ve 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.

@rossabaker
Copy link
Member

The necessary dependency chain is cats -> cats-effect -> fs2 -> http4s. It's still on step one, but, well, maybe someday. :)

@jmcardon
Copy link
Contributor

jmcardon commented Mar 8, 2018

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.

@rossabaker rossabaker added the enhancement Feature requests and improvements label Mar 26, 2018
@rossabaker
Copy link
Member

I am not particularly excited about this when we have GraalVM, and scant progress has been made in our dependencies. I doubt this one is ever going to happen.

We can revisit if and when fs2 gets it.

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

No branches or pull requests

5 participants