Skip to content

Commit f5ed837

Browse files
spamegg1Gedochao
andauthored
Add directive examples in Scala Native docs (#2774)
* Update scala-native.md - mention relevant `using` directives for Scala Native files / projects * Fix reference doc link --------- Co-authored-by: Piotr Chabelski <[email protected]>
1 parent 052aea8 commit f5ed837

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

website/docs/guides/advanced/scala-native.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,13 @@ A Scala Native version can be set by passing `--native-version` with an argument
2020
scala-cli Test.scala --native --native-version 0.4.3
2121
```
2222

23+
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):
24+
25+
```scala
26+
//> using platform native
27+
//> using nativeVersion 0.4.3
28+
```
29+
2330
Platform compatibility and supported Scala language versions depend on this version.
2431
It is recommended to use the newest stable version.
2532

0 commit comments

Comments
 (0)