# Newby Scala question: can I use your library written in Scala 2 in my project I want to write in Scala 3?

**URL:** https://forum.canton.network/t/newby-scala-question-can-i-use-your-library-written-in-scala-2-in-my-project-i-want-to-write-in-scala-3/6590
**Category:** App Development
**Created:** [May 24, 2023, 3:25pm UTC](https://forum.canton.network/t/newby-scala-question-can-i-use-your-library-written-in-scala-2-in-my-project-i-want-to-write-in-scala-3/6590 "2023-05-24T15:25:47Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![gyorgybalazsi](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/gyorgybalazsi/32/684_2.png) [@gyorgybalazsi](https://forum.canton.network/u/gyorgybalazsi)
#### Post date: [May 24, 2023, 3:25pm UTC](https://forum.canton.network/t/newby-scala-question-can-i-use-your-library-written-in-scala-2-in-my-project-i-want-to-write-in-scala-3/6590/1 "2023-05-24T15:25:47Z")

</div>

I want to use the Daml LF Interface library which says was written in Scala 2.13: [https://mvnrepository.com/artifact/com.daml/daml-lf-interface](https://mvnrepository.com/artifact/com.daml/daml-lf-interface)

For my code, I would prefer Scala 3 since it’s advertised as superior.

---

<div class="post-metadata">

### Author: ![Stephen](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/stephen/32/102_2.png) [@Stephen](https://forum.canton.network/u/Stephen)
#### Post date: [May 24, 2023, 4:00pm UTC](https://forum.canton.network/t/newby-scala-question-can-i-use-your-library-written-in-scala-2-in-my-project-i-want-to-write-in-scala-3/6590/2 "2023-05-24T16:00:39Z")

</div>

First, I should mention that you probably want [api-type-signature](https://mvnrepository.com/artifact/com.daml/daml-lf-api-type-signature) instead beyond a certain version of Daml. This is the new name of the interface library.

Second, I’m sure you saw this if you reviewed the prior discussions, but api-type-signature is technically an internal library, though, again, [you probably saw my argument why it is worth using anyway](https://discuss.daml.com/t/template-json-payload-identification/2641/10).

Finally, to answer your question, as explained in Scala 3 docs, [it is possible to depend on a Scala 2.13 library from a Scala 3 project](https://docs.scala-lang.org/scala3/guides/migration/compatibility-classpath.html). I suggest following this path.

---

<div class="post-metadata">

### Author: ![stefanobaghino-da](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/stefanobaghino-da/32/7057_2.png) [@stefanobaghino-da](https://forum.canton.network/u/stefanobaghino-da)
#### Post date: [May 24, 2023, 4:04pm UTC](https://forum.canton.network/t/newby-scala-question-can-i-use-your-library-written-in-scala-2-in-my-project-i-want-to-write-in-scala-3/6590/3 "2023-05-24T16:04:16Z")

</div>

> [@Stephen](#):
>
> First, I should mention that you probably want [api-type-signature](https://mvnrepository.com/artifact/com.daml/daml-lf-api-type-signature) instead beyond a certain version of Daml.

I believe this is valid from Daml 2.6, to be clearer. The library has been renamed to avoid confusion with Daml interfaces, which the library is capable of handling but are not its only focus.

---

<div class="post-metadata">

### Author: ![gyorgybalazsi](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/gyorgybalazsi/32/684_2.png) [@gyorgybalazsi](https://forum.canton.network/u/gyorgybalazsi)
#### Post date: [May 24, 2023, 4:04pm UTC](https://forum.canton.network/t/newby-scala-question-can-i-use-your-library-written-in-scala-2-in-my-project-i-want-to-write-in-scala-3/6590/4 "2023-05-24T16:04:24Z")

</div>

Thank you, Stephen!
