Coder Social home page Coder Social logo

ScalaJS support about cbt HOT 11 CLOSED

cvogt avatar cvogt commented on August 15, 2024
ScalaJS support

from cbt.

Comments (11)

sjrd avatar sjrd commented on August 15, 2024 1

The minimum minimorum is to be able to 1) compile and 2) link.

Compile is as easy as running the Scala compiler with scalajs-library.jar on the classpath, and scalajs-compiler.jar as a scalac plugin.

Linking is as easy as reproducing the code from the CLI linker at
https://github.com/scala-js/scala-js/blob/v0.6.7/cli/src/main/scala/org/scalajs/cli/Scalajsld.scala#L137-L177

Of course, that assumes people will then run their code on their own. But you probably want your build tool to allow them to run easily. That becomes a bit more tricky, but the core idea can be found at:
https://github.com/scala-js/scala-js/blob/v0.6.7/sbt-plugin/src/main/scala/scala/scalajs/sbtplugin/ScalaJSPluginInternal.scala#L561-L679

from cbt.

katrinsharp avatar katrinsharp commented on August 15, 2024

@cvogt @sjrd I'll try to dig into it. Will keep you posted.

from cbt.

cvogt avatar cvogt commented on August 15, 2024

Sounds awesome. Excited about this :). I am sure @sjrd and @gzm0 are happy to answer questions if they arise. Me too.

cc @lihaoyi

from cbt.

cvogt avatar cvogt commented on August 15, 2024

assigned to @katrinsharp

from cbt.

cvogt avatar cvogt commented on August 15, 2024

@katrinsharp everything is in place now in cbt to take a crack at this.

from cbt.

katrinsharp avatar katrinsharp commented on August 15, 2024

@cvogt had some prior commitments so only played with the code so far, but will take it as commitment now.

from cbt.

katrinsharp avatar katrinsharp commented on August 15, 2024

@sjrd, @gzm0 question: why maven dependency scalajs-compiler artifact has full scala version 2.11.8 and not 2.11 ? (http://mvnrepository.com/artifact/org.scala-js/scalajs-compiler_2.11.8/0.6.9) Feels like a bug unless it is feature :)

from cbt.

sjrd avatar sjrd commented on August 15, 2024

It is a feature. The compiler API is neither source nor binary compatible between minor versions of Scala, so compiler plugins must always be fully cross-compiled.

from cbt.

cvogt avatar cvogt commented on August 15, 2024

#121

from cbt.

katrinsharp avatar katrinsharp commented on August 15, 2024

#144

from cbt.

cvogt avatar cvogt commented on August 15, 2024

basic support implemented in #144

from cbt.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.