Documentation tweaks.
This commit is contained in:
@@ -16,10 +16,16 @@ Q: How do I create shared library?
|
|||||||
|
|
||||||
A: Use `-produce dynamic` compiler switch, or `konanArtifacts { dynamic('foo') {} }` in Gradle.
|
A: Use `-produce dynamic` compiler switch, or `konanArtifacts { dynamic('foo') {} }` in Gradle.
|
||||||
It will produce platform-specific shared object (.so on Linux, .dylib on macOS and .dll on Windows targets) and
|
It will produce platform-specific shared object (.so on Linux, .dylib on macOS and .dll on Windows targets) and
|
||||||
C language header, allowing to use all public APIs available in your Kotlin/Native program from C code.
|
C language header, allowing to use all public APIs available in your Kotlin/Native program from C/C++ code.
|
||||||
See `samples/python_extension` as an example of using such shared object to provide a bridge between Python and
|
See `samples/python_extension` as an example of using such shared object to provide a bridge between Python and
|
||||||
Kotlin/Native.
|
Kotlin/Native.
|
||||||
|
|
||||||
|
Q: How do I create static library or an object file?
|
||||||
|
|
||||||
|
A: Use `-produce static` compiler switch, or `konanArtifacts { static('foo') {} }` in Gradle.
|
||||||
|
It will produce platform-specific static object (.a library format) and C language header, allowing to
|
||||||
|
use all public APIs available in your Kotlin/Native program from C/C++ code.
|
||||||
|
|
||||||
Q: How do I run Kotlin/Native behind corporate proxy?
|
Q: How do I run Kotlin/Native behind corporate proxy?
|
||||||
|
|
||||||
A: As Kotlin/Native need to download platform specific toolchain, you need to specify
|
A: As Kotlin/Native need to download platform specific toolchain, you need to specify
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ without the need to ship an additional execution runtime.
|
|||||||
|
|
||||||
Prerequisites:
|
Prerequisites:
|
||||||
* install JDK for your platform, instead of JRE. The build requires ```tools.jar```, which is not included in JRE;
|
* install JDK for your platform, instead of JRE. The build requires ```tools.jar```, which is not included in JRE;
|
||||||
* on macOS install Xcode 9.3
|
* on macOS install Xcode 9.4.1
|
||||||
* on Fedora 26+ ```yum install ncurses-compat-libs``` may be needed
|
* on Fedora 26+ ```yum install ncurses-compat-libs``` may be needed
|
||||||
|
|
||||||
To compile from sources use following steps:
|
To compile from sources use following steps:
|
||||||
|
|||||||
+2
-2
@@ -25,7 +25,7 @@ the following platforms:
|
|||||||
(`-target linux`, default on Linux hosts)
|
(`-target linux`, default on Linux hosts)
|
||||||
* Microsoft Windows x86-64 (tested on Windows 7 and Windows 10), host and target (`-target mingw`,
|
* Microsoft Windows x86-64 (tested on Windows 7 and Windows 10), host and target (`-target mingw`,
|
||||||
default on Windows hosts)
|
default on Windows hosts)
|
||||||
* Apple iOS (arm64), cross-compiled target (`-target ios`), hosted on macOS
|
* Apple iOS (armv7 and arm64 devices, x86 simulator), cross-compiled target (`-target ios_arm64`), hosted on macOS
|
||||||
* Linux arm32 hardfp, Raspberry Pi, cross-compiled target (`-target raspberrypi`), hosted on Linux
|
* Linux arm32 hardfp, Raspberry Pi, cross-compiled target (`-target raspberrypi`), hosted on Linux
|
||||||
* Linux mips big endian, cross-compiled target (`-target mips`), hosted on Linux
|
* Linux mips big endian, cross-compiled target (`-target mips`), hosted on Linux
|
||||||
* Linux mips little endian, cross-compiled target (`-target mipsel`), hosted on Linux
|
* Linux mips little endian, cross-compiled target (`-target mipsel`), hosted on Linux
|
||||||
@@ -38,7 +38,7 @@ the following platforms:
|
|||||||
|
|
||||||
To run _Kotlin/Native_ JDK 8 or Java 9 (JDK) for the host platform has to be installed.
|
To run _Kotlin/Native_ JDK 8 or Java 9 (JDK) for the host platform has to be installed.
|
||||||
|
|
||||||
On macOS it also requires Xcode 9.3 or newer to be installed.
|
On macOS it also requires Xcode 9.4.1 or newer to be installed.
|
||||||
|
|
||||||
The language and library version supported by this EAP release mostly match Kotlin 1.2.60.
|
The language and library version supported by this EAP release mostly match Kotlin 1.2.60.
|
||||||
However, there are certain limitations, see section [Known Limitations](#limitations).
|
However, there are certain limitations, see section [Known Limitations](#limitations).
|
||||||
|
|||||||
@@ -75,7 +75,9 @@ class K2NativeCompilerArguments : CommonCompilerArguments() {
|
|||||||
@Argument(value = "-entry", shortName = "-e", valueDescription = "<name>", description = "Qualified entry point name")
|
@Argument(value = "-entry", shortName = "-e", valueDescription = "<name>", description = "Qualified entry point name")
|
||||||
var mainPackage: String? = null
|
var mainPackage: String? = null
|
||||||
|
|
||||||
@Argument(value = "-produce", shortName = "-p", valueDescription = "{program|dynamic|framework|library|bitcode}", description = "Specify output file kind")
|
@Argument(value = "-produce", shortName = "-p",
|
||||||
|
valueDescription = "{program|static|dynamic|framework|library|bitcode}",
|
||||||
|
description = "Specify output file kind")
|
||||||
var produce: String? = null
|
var produce: String? = null
|
||||||
|
|
||||||
@Argument(value = "-repo", shortName = "-r", valueDescription = "<path>", description = "Library search path")
|
@Argument(value = "-repo", shortName = "-r", valueDescription = "<path>", description = "Library search path")
|
||||||
|
|||||||
Reference in New Issue
Block a user