Skip to content

Commit

Permalink
Add directive examples in Scala Native docs (#2774)
Browse files Browse the repository at this point in the history
* Update scala-native.md

- mention relevant `using` directives for Scala Native files / projects

* Fix reference doc link

---------

Co-authored-by: Piotr Chabelski <ged.subfan@gmail.com>
  • Loading branch information
spamegg1 and Gedochao authored Mar 6, 2024
1 parent 052aea8 commit f5ed837
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions website/docs/guides/advanced/scala-native.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,13 @@ A Scala Native version can be set by passing `--native-version` with an argument
scala-cli Test.scala --native --native-version 0.4.3
```

These can also be set in a file, or in a project (in your [`project.scala`](https://scala-cli.virtuslab.org/docs/reference/root-dir/) file) by [`using`](https://scala-cli.virtuslab.org/docs/reference/scala-command/directives/#platform) [directives](https://scala-cli.virtuslab.org/docs/reference/scala-command/directives/#scala-native-options):

```scala
//> using platform native
//> using nativeVersion 0.4.3
```

Platform compatibility and supported Scala language versions depend on this version.
It is recommended to use the newest stable version.

Expand Down

0 comments on commit f5ed837

Please sign in to comment.