-
Notifications
You must be signed in to change notification settings - Fork 56
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Enable Wasm target and updated Kotlin version to 1.9.10
- Loading branch information
Showing
9 changed files
with
119 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
/* | ||
* Copyright 2010-2023 JetBrains s.r.o. and Kotlin Programming Language contributors. | ||
* Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE.txt file. | ||
*/ | ||
|
||
package kotlinx.io | ||
|
||
import kotlinx.io.internal.commonAsUtf8ToByteArray | ||
|
||
internal actual fun String.asUtf8ToByteArray(): ByteArray = commonAsUtf8ToByteArray() | ||
|
||
public actual open class IOException actual constructor( | ||
message: String?, | ||
cause: Throwable? | ||
) : Exception(message, cause) { | ||
public actual constructor(message: String?) : this(message, null) | ||
} | ||
|
||
public actual open class EOFException actual constructor(message: String?) : IOException(message) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
/* | ||
* Copyright 2010-2023 JetBrains s.r.o. and Kotlin Programming Language contributors. | ||
* Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE.txt file. | ||
*/ | ||
|
||
package kotlinx.io | ||
|
||
@OptIn(ExperimentalStdlibApi::class) | ||
public actual interface RawSink : AutoCloseableAlias { | ||
public actual fun write(source: Buffer, byteCount: Long) | ||
|
||
public actual fun flush() | ||
|
||
actual override fun close() | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
/* | ||
* Copyright 2010-2023 JetBrains s.r.o. and Kotlin Programming Language contributors. | ||
* Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE.txt file. | ||
*/ | ||
|
||
package kotlinx.io | ||
|
||
internal actual object SegmentPool { | ||
actual val MAX_SIZE: Int = 0 | ||
|
||
actual val byteCount: Int = 0 | ||
|
||
actual fun take(): Segment = Segment() | ||
|
||
actual fun recycle(segment: Segment) { | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
/* | ||
* Copyright 2010-2023 JetBrains s.r.o. and Kotlin Programming Language contributors. | ||
* Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE.txt file. | ||
*/ | ||
|
||
package kotlinx.io.files | ||
|
||
import kotlinx.io.Sink | ||
import kotlinx.io.Source | ||
|
||
|
||
public actual class Path internal constructor(private val path: String, | ||
@Suppress("UNUSED_PARAMETER") any: Any?) { | ||
override fun toString(): String = path | ||
} | ||
|
||
public actual fun Path(path: String): Path { | ||
return Path(path, null) | ||
} | ||
|
||
public actual fun Path.source(): Source { | ||
TODO("Paths are not supported for Wasm target") | ||
} | ||
|
||
public actual fun Path.sink(): Sink { | ||
TODO("Paths are not supported for Wasm target") | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
/* | ||
* Copyright 2010-2023 JetBrains s.r.o. and Kotlin Programming Language contributors. | ||
* Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE.txt file. | ||
*/ | ||
|
||
package kotlinx.io | ||
|
||
actual fun createTempFile(): String { | ||
TODO("Paths are not supported for Wasm target") | ||
} | ||
|
||
actual fun deleteFile(path: String) { | ||
TODO("Paths are not supported for Wasm target") | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
[versions] | ||
kotlin = "1.9.0" | ||
kotlin = "1.9.10" | ||
java = "8" | ||
dokka = "1.8.20" | ||
kover = "0.7.3" | ||
|