Richard-W / scalacrypt

Provides various cryptographic functions for scala.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

scalajs support

antonkulaga opened this issue · comments

I thikn scalajs support will be useful for some usecases. As you do not use any jvm dependnecies moving library to cross-project should not be hard.

I will do that in the near future. Thanks for the hint to the plugin. Problem is that sbt-pgp stops to work when including the cross-project plugin. It breaks publishing to maven-central.

You were right though. Scalacrypt compiles without any issues (at first glance) using scala.js.

roblem is that sbt-pgp stops to work when including the cross-project plugin

I personally do not use sbt-pgp, but I can look at your sbt configuration. Crossproject is not an sbt project but a wrapper that creates two sbt projects (one for JVM and one for JS). Try to run sbt-pgp on JVM and JS projects separately and check if it works (if yes, then you will aggregate these two projects from sbt root project).

P.S.
I hope you did not forget to update scalatest to the latest milestone to run tests on both scalaJVM/JS

libraryDependencies += "org.scalatest" %%% "scalatest" % "3.0.0-M7"

Pushed changes to branch wip/scalajs-support. Tests are still failing, but i'll try to get it to work soon.

General rule of porting an app to scalajs is to: avoid runtime relfection, check semantic of regex (there are small differences between scalajs and scalajvm) and check all java parts that are used. I noticed
that you have usage of java.security in your code. I am not totally sure that all java.security was ported to scalajs, so it makes sence to check it or ask scalajs core devs about it ( the are active in https://gitter.im/scala-js/scala-js gitter channel)