@@ -67,6 +67,7 @@ val enableProguard = false
67
67
val enableDashboard = false
68
68
val encloseSdk = false
69
69
val oracleGvm = false
70
+ val enableEdge = true
70
71
71
72
buildscript {
72
73
repositories {
@@ -83,7 +84,7 @@ buildscript {
83
84
if (enableMosaic) apply (plugin = " com.jakewharton.mosaic" )
84
85
85
86
val jvmCompileArgs = listOf (
86
- // "--enable-preview",
87
+ " --enable-preview" ,
87
88
" --add-exports=java.base/jdk.internal.module=elide.cli" ,
88
89
" --add-exports=jdk.internal.vm.compiler/org.graalvm.compiler.options=elide.cli" ,
89
90
" --add-exports=jdk.internal.vm.compiler/org.graalvm.compiler.options=ALL-UNNAMED" ,
@@ -147,8 +148,8 @@ kotlin {
147
148
}
148
149
149
150
// use consistent compose plugin version
150
- // the<com.jakewharton.mosaic.gradle.MosaicExtension>().kotlinCompilerPlugin =
151
- // libs.versions.compose.get()
151
+ the< com.jakewharton.mosaic.gradle.MosaicExtension > ().kotlinCompilerPlugin =
152
+ libs.versions.compose.get()
152
153
153
154
kapt {
154
155
useBuildCache = true
@@ -188,17 +189,19 @@ dependencies {
188
189
189
190
// GraalVM: Engines
190
191
implementation(projects.packages.graalvm)
191
- implementation(projects.packages.graalvmJvm)
192
- implementation(projects.packages.graalvmLlvm)
193
- implementation(projects.packages.graalvmPy)
194
- implementation(projects.packages.graalvmRb)
195
- implementation(projects.packages.graalvmKt)
196
- implementation(projects.packages.graalvmWasm)
192
+ if (enableEspresso) implementation(projects.packages.graalvmJvm)
193
+ if (enableLlvm) implementation(projects.packages.graalvmLlvm)
194
+ if (enablePython) implementation(projects.packages.graalvmPy)
195
+ if (enableRuby) implementation(projects.packages.graalvmRb)
196
+ if (enableEspresso) implementation(projects.packages.graalvmKt)
197
+ if (enableWasm) implementation(projects.packages.graalvmWasm)
197
198
198
199
api(libs.picocli)
200
+ api(libs.slf4j)
201
+ api(libs.slf4j.jul)
202
+ api(libs.slf4j.log4j.bridge)
203
+
199
204
implementation(libs.picocli.jansi.graalvm)
200
- implementation(libs.slf4j)
201
- implementation(libs.slf4j.jul)
202
205
implementation(libs.jline.reader)
203
206
implementation(libs.jline.console)
204
207
implementation(libs.jline.terminal.core)
@@ -212,6 +215,18 @@ dependencies {
212
215
213
216
api(mn.micronaut.inject)
214
217
implementation(mn.micronaut.picocli)
218
+ implementation(mn.micronaut.http)
219
+ implementation(mn.micronaut.http.netty)
220
+ implementation(mn.micronaut.http.client)
221
+ implementation(mn.micronaut.http.server)
222
+ implementation(mn.netty.handler)
223
+ implementation(mn.netty.handler.proxy)
224
+ implementation(mn.netty.codec.http)
225
+ implementation(mn.netty.codec.http2)
226
+ implementation(mn.netty.buffer)
227
+ implementation(mn.netty.incubator.codec.http3)
228
+ implementation(mn.micronaut.websocket)
229
+
215
230
runtimeOnly(mn.micronaut.context)
216
231
runtimeOnly(mn.micronaut.kotlin.runtime)
217
232
@@ -220,6 +235,10 @@ dependencies {
220
235
runtimeOnly(projects.packages.proto.protoKotlinx)
221
236
222
237
runtimeOnly(mn.micronaut.graal)
238
+ implementation(" org.eclipse.jetty.npn:npn-api:8.1.2.v20120308" )
239
+ implementation(" org.eclipse.jetty.alpn:alpn-api:1.1.3.v20160715" )
240
+
241
+ implementation(libs.netty.tcnative)
223
242
224
243
val arch = when (System .getProperty(" os.arch" )) {
225
244
" amd64" , " x86_64" -> " x86_64"
@@ -235,10 +254,9 @@ dependencies {
235
254
when {
236
255
Os .isFamily(Os .FAMILY_MAC ) -> {
237
256
implementation(libs.netty.transport.native.kqueue)
238
- implementation(libs.netty.transport.native.kqueue)
239
- implementation(variantOf(libs.netty.transport.native.kqueue) { classifier(" osx-$arch " ) })
240
257
implementation(variantOf(libs.netty.transport.native.kqueue) { classifier(" osx-$arch " ) })
241
258
implementation(libs.netty.resolver.dns.native.macos)
259
+ implementation(variantOf(libs.netty.tcnative.boringssl.static) { classifier(" osx-$arch " ) })
242
260
}
243
261
244
262
else -> {
@@ -443,15 +461,16 @@ val commonNativeArgs = listOf(
443
461
" --language:icu4j" ,
444
462
" --language:regex" ,
445
463
" --no-fallback" ,
446
- // "--enable-preview",
464
+ " --enable-preview" ,
447
465
" --enable-http" ,
448
466
" --enable-https" ,
467
+ " --enable-all-security-services" ,
449
468
" --install-exit-handlers" ,
450
469
" -H:CStandard=C11" ,
451
470
" -H:DefaultCharset=UTF-8" ,
452
471
" -H:+UseContainerSupport" ,
453
472
" -H:+ReportExceptionStackTraces" ,
454
- " -H:- EnableAllSecurityServices" ,
473
+ " -H:+ EnableAllSecurityServices" ,
455
474
" -R:MaxDirectMemorySize=256M" ,
456
475
" -Dpolyglot.image-build-time.PreinitializeContexts=js" ,
457
476
" --trace-object-instantiation=elide.tool.cli.PropertySourceLoaderFactory" ,
@@ -462,19 +481,13 @@ val commonNativeArgs = listOf(
462
481
if (enableLlvm) " --language:llvm" else null ,
463
482
if (enablePython) " --language:python" else null ,
464
483
if (enableRuby) " --language:ruby" else null ,
465
- )).plus(
466
- if (enableTools) listOf (
484
+ )).plus(if (enableTools) listOf (
467
485
" --tool:chromeinspector" ,
468
486
" --tool:coverage" ,
469
487
" --tool:profiler" ,
470
- ) else emptyList()
471
- ).plus(
472
- if (enableTruffleJson) listOf (
473
- " --language:truffle-json" ,
474
- ) else emptyList()
475
- ).plus(
476
- jvmModuleArgs
477
- ).plus(if (oracleGvm) commonGvmArgs else emptyList())
488
+ ) else emptyList()).plus(if (enableEdge) listOfNotNull(
489
+ if (! enableTruffleJson) null else " --language:truffle-json" ,
490
+ ) else emptyList()).plus(if (oracleGvm) commonGvmArgs else emptyList())
478
491
479
492
val dashboardFlags: List <String > = listOf (
480
493
" -H:DashboardDump=elide-tool" ,
@@ -525,8 +538,8 @@ val experimentalFlags = listOf(
525
538
526
539
// CFlags for release mode.
527
540
val releaseCFlags: List <String > = listOf (
528
- // "-O3",
529
- // "-flto",
541
+ " -O3" ,
542
+ " -flto" ,
530
543
)
531
544
532
545
// PGO profiles to specify in release mode.
@@ -588,29 +601,32 @@ val initializeAtBuildTime = listOf(
588
601
" com.google.common.jimfs.Feature" ,
589
602
" com.google.common.jimfs.SystemJimfsFileSystemProvider" ,
590
603
" ch.qos.logback" ,
604
+ " org.slf4j.MarkerFactory" ,
591
605
" org.slf4j.simple.SimpleLogger" ,
592
606
" org.slf4j.impl.StaticLoggerBinder" ,
593
- // "org.codehaus.stax2.typed.Base64Variants",
594
- // "org.bouncycastle.util.Properties",
595
- // "org.bouncycastle.util.Strings",
596
- // "org.bouncycastle.crypto.macs.HMac",
597
- // "org.bouncycastle.crypto.prng.drbg.Utils",
598
- // "org.bouncycastle.jcajce.provider.drbg.DRBG",
599
- // "org.bouncycastle.jcajce.provider.drbg.DRBG$${'$'}Default",
600
- // "com.sun.tools.doclint",
601
- // "jdk.jshell.Snippet${'$'}SubKind",
602
- // "com.sun.tools.javac.parser.Tokens${'$'}TokenKind",
607
+ " org.codehaus.stax2.typed.Base64Variants" ,
608
+ " org.bouncycastle.util.Properties" ,
609
+ " org.bouncycastle.util.Strings" ,
610
+ " org.bouncycastle.crypto.macs.HMac" ,
611
+ " org.bouncycastle.crypto.prng.drbg.Utils" ,
612
+ " org.bouncycastle.jcajce.provider.drbg.DRBG" ,
613
+ " org.bouncycastle.jcajce.provider.drbg.DRBG$${' $' } Default" ,
614
+ " com.sun.tools.doclint" ,
615
+ " jdk.jshell.Snippet${' $' } SubKind" ,
616
+ " com.sun.tools.javac.parser.Tokens${' $' } TokenKind" ,
603
617
" org.xml.sax.helpers.LocatorImpl" ,
604
618
" org.xml.sax.helpers.AttributesImpl" ,
605
619
" org.sqlite.util.ProcessRunner" ,
606
620
" io.netty.handler.codec.http.cookie.ServerCookieEncoder" ,
621
+ " io.micronaut.http.util.HttpTypeInformationProvider" ,
622
+ " io.micronaut.inject.provider.ProviderTypeInformationProvider" ,
623
+ " io.micronaut.core.async.ReactiveStreamsTypeInformationProvider" ,
607
624
" com.google.common.collect.MapMakerInternalMap" ,
608
625
" com.google.common.collect.MapMakerInternalMap${' $' } StrongKeyWeakValueSegment" ,
609
626
" com.google.common.collect.MapMakerInternalMap${' $' } EntrySet" ,
610
627
" com.google.common.collect.MapMakerInternalMap${' $' } StrongKeyWeakValueEntry${' $' } Helper" ,
611
628
" com.google.common.collect.MapMakerInternalMap${' $' } 1" ,
612
629
" com.google.common.base.Equivalence${' $' } Equals" ,
613
-
614
630
//
615
631
// "elide.tool.cli.HttpRequestFactoryFactory",
616
632
// "elide.tool.cli.HttpResponseFactoryFactory",
@@ -626,12 +642,11 @@ val initializeAtBuildTimeTest: List<String> = listOf(
626
642
)
627
643
628
644
val initializeAtRuntime: List <String > = listOf (
629
- " io.netty.channel.ChannelInitializer" ,
645
+ // "io.netty.channel.ChannelInitializer",
630
646
" ch.qos.logback.core.AsyncAppenderBase${' $' } Worker" ,
631
647
" io.micronaut.core.util.KotlinUtils" ,
632
648
" io.micrometer.common.util.internal.logging.Slf4JLoggerFactory" ,
633
649
" com.sun.tools.javac.file.Locations" ,
634
- // "org.bouncycastle.jcajce.provider.drbg.DRBG${'$'}NonceAndIV",
635
650
)
636
651
637
652
val initializeAtRuntimeTest: List <String > = emptyList()
@@ -660,7 +675,6 @@ val darwinOnlyArgs = defaultPlatformArgs.plus(listOf(
660
675
" -march=native" ,
661
676
" --gc=serial" ,
662
677
" -Delide.vm.engine.preinitialize=true" ,
663
- " -H:+AllowJRTFileSystem" ,
664
678
" -H:InitialCollectionPolicy=Adaptive" ,
665
679
" -R:MaximumHeapSizePercent=80" ,
666
680
).plus(if (project.properties[" elide.ci" ] == " true" ) listOf (
@@ -678,7 +692,6 @@ val linuxOnlyArgs = defaultPlatformArgs.plus(listOf(
678
692
" -march=native" ,
679
693
" -H:RuntimeCheckedCPUFeatures=AVX,AVX2" ,
680
694
" -H:+StaticExecutableWithDynamicLibC" ,
681
- " -H:+AllowJRTFileSystem" ,
682
695
)).plus(
683
696
if (enableG1) listOf (
684
697
" --gc=G1" ,
0 commit comments