mbonnin
02/01/2023, 1:12 PMString
literal in Kotlin? Given multiplatform resources are not really a thing, how bad of an idea is it to store large texts/images in String
literals?jw
02/01/2023, 1:32 PMmbonnin
02/01/2023, 1:33 PMmbonnin
02/01/2023, 1:34 PMjw
02/01/2023, 1:34 PMconst
usages such as passing as annotation valuesjw
02/01/2023, 1:35 PMjw
02/01/2023, 1:35 PMmbonnin
02/01/2023, 1:44 PMmbonnin
02/01/2023, 1:44 PM@JvmField
mbonnin
02/01/2023, 1:47 PMStringBuilder
magic is done in the initializer for something like this:
val hugeString = """
// very long string
"""
mbonnin
02/01/2023, 1:49 PMmbonnin
02/01/2023, 2:43 PMMichael Paus
02/01/2023, 3:51 PMmbonnin
02/01/2023, 3:55 PMcompose-jb
resources! My needs is that I need to ship these resources as part as a library so I need a multiplatform way to embed them in .jars, .klibs, etc... I wasn't sure the formats allowed this but I'll investigate π΅οΈdarkmoon_uk
02/02/2023, 3:37 AMGiven multiplatform resources are not really a thingMokoResources is my go-to for this; it's rather useful, covering mobiles, Desktop and JS
mbonnin
02/02/2023, 8:43 AM.klib
, right? Only frameworks?MJegorovas
04/11/2023, 11:46 AMklib
.mbonnin
04/11/2023, 1:34 PMMatt Nelson
11/10/2023, 12:43 PM.klib
@mbonnin? I have a prebuilt executable that I wish to ship with my library for darwin/linux targets, so it can be extracted and then executed at runtime.mbonnin
11/10/2023, 12:46 PMMatt Nelson
11/10/2023, 12:51 PMmbonnin
11/10/2023, 12:51 PMMatt Nelson
11/10/2023, 12:52 PMmbonnin
11/10/2023, 12:53 PMmbonnin
11/10/2023, 12:55 PMmbonnin
11/10/2023, 12:55 PMMatt Nelson
11/10/2023, 1:02 PM.kt
file
β’ At runtime that gets written to specified directory.
Insanity, but doablembonnin
11/10/2023, 1:02 PMmbonnin
11/10/2023, 1:10 PMMatt Nelson
11/10/2023, 1:13 PMMatt Nelson
11/20/2023, 9:45 PMMatt Nelson
12/06/2023, 9:13 AMNativeResource
.
Still have work to do on extraction of that resource to the application filesystem, but it's pretty slick (i think at least)Matt Nelson
12/11/2023, 3:47 PMMatt Nelson
12/11/2023, 3:48 PM.a
binaries include the shared libs which can now be extracted to the filesystem and be executed in a child process. Jesus what a headache.mbonnin
12/11/2023, 4:16 PMmbonnin
12/11/2023, 4:17 PMmbonnin
12/11/2023, 4:18 PM.kt
at build time?)Matt Nelson
12/11/2023, 4:22 PMtor
will be able to easily verify with like, 3 shell commands + docker).Matt Nelson
12/11/2023, 4:22 PMMatt Nelson
12/11/2023, 4:51 PMMatt Nelson
12/11/2023, 5:17 PMMatt Nelson
12/11/2023, 5:17 PMmbonnin
12/11/2023, 5:17 PMmbonnin
12/11/2023, 5:17 PMMatt Nelson
12/11/2023, 6:20 PM