forked from rashtao/arango-micronaut-native-example
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
1,166 additions
and
4 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
46 changes: 42 additions & 4 deletions
46
src/main/resources/META-INF/native-image/com/example/demo/native-image.properties
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,43 @@ | ||
Args=\ | ||
--initialize-at-build-time=\ | ||
com.example,\ | ||
ch.qos.logback,\ | ||
org.slf4j | ||
-Dio.netty.noUnsafe=true \ | ||
-Dio.netty.leakDetection.level=DISABLED \ | ||
--initialize-at-build-time=\ | ||
com.example,\ | ||
ch.qos.logback,\ | ||
org.slf4j,\ | ||
io.netty \ | ||
--initialize-at-run-time=\ | ||
io.netty.buffer.PooledByteBufAllocator,\ | ||
io.netty.buffer.ByteBufAllocator,\ | ||
io.netty.buffer.ByteBufUtil,\ | ||
io.netty.buffer.AbstractReferenceCountedByteBuf,\ | ||
io.netty.handler.ssl.JdkSslServerContext,\ | ||
io.netty.handler.codec.compression.BrotliDecoder,\ | ||
io.netty.handler.codec.compression.ZstdConstants,\ | ||
io.netty.handler.codec.http2.Http2CodecUtil,\ | ||
io.netty.handler.codec.http2.Http2ClientUpgradeCodec,\ | ||
io.netty.handler.codec.http2.Http2ConnectionHandler,\ | ||
io.netty.handler.codec.http2.DefaultHttp2FrameWriter,\ | ||
io.netty.handler.codec.http.HttpObjectEncoder,\ | ||
io.netty.handler.codec.http.websocketx.WebSocket00FrameEncoder,\ | ||
io.netty.handler.codec.http.websocketx.extensions.compression.DeflateDecoder,\ | ||
io.netty.handler.codec.http2.CleartextHttp2ServerUpgradeHandler,\ | ||
io.netty.handler.codec.http2.Http2ServerUpgradeCodec,\ | ||
io.netty.handler.pcap.PcapWriteHandler$WildcardAddressHolder,\ | ||
io.netty.util.AbstractReferenceCounted,\ | ||
io.netty.util.concurrent.GlobalEventExecutor,\ | ||
io.netty.util.concurrent.ImmediateEventExecutor,\ | ||
io.netty.util.concurrent.ScheduledFutureTask,\ | ||
io.netty.util.internal.ThreadLocalRandom,\ | ||
io.netty.util.NetUtilSubstitutions$NetUtilLocalhost4LazyHolder,\ | ||
io.netty.util.NetUtilSubstitutions$NetUtilLocalhost6LazyHolder,\ | ||
io.netty.util.NetUtilSubstitutions$NetUtilLocalhostLazyHolder,\ | ||
io.netty.util.NetUtilSubstitutions$NetUtilNetworkInterfacesLazyHolder,\ | ||
io.netty.handler.ssl.util.ThreadLocalInsecureRandom,\ | ||
io.netty.resolver.dns.DefaultDnsServerAddressStreamProvider,\ | ||
io.netty.resolver.dns.DnsServerAddressStreamProviders$DefaultProviderHolder,\ | ||
io.netty.resolver.dns.DnsNameResolver,\ | ||
io.netty.resolver.HostsFileEntriesResolver,\ | ||
io.netty.resolver.dns.ResolvConf$ResolvConfLazy,\ | ||
io.netty.resolver.dns.DefaultDnsServerAddressStreamProvider,\ | ||
io.vertx.core.buffer.impl.VertxByteBufAllocator |
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,20 @@ | ||
package graal; | ||
|
||
import com.oracle.svm.core.annotate.Substitute; | ||
import com.oracle.svm.core.annotate.TargetClass; | ||
|
||
public class BrotliSubstitutions { | ||
|
||
@TargetClass(className = "io.netty.handler.codec.compression.Brotli") | ||
static final class Target_io_netty_handler_codec_compression_Brotli { | ||
@Substitute | ||
public static boolean isAvailable() { | ||
return false; | ||
} | ||
|
||
@Substitute | ||
public static void ensureAvailability() throws Throwable { | ||
throw new UnsupportedOperationException(); | ||
} | ||
} | ||
} |
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,98 @@ | ||
package graal.graal; | ||
|
||
import com.oracle.svm.core.annotate.Alias; | ||
import com.oracle.svm.core.annotate.InjectAccessors; | ||
import com.oracle.svm.core.annotate.Substitute; | ||
import com.oracle.svm.core.annotate.TargetClass; | ||
import org.graalvm.nativeimage.Platform; | ||
import org.graalvm.nativeimage.Platforms; | ||
|
||
import java.io.IOException; | ||
import java.net.URL; | ||
import java.nio.channels.spi.AsynchronousChannelProvider; | ||
|
||
@TargetClass(className = "jdk.internal.loader.URLClassPath$Loader") | ||
final class Target_URLClassPath$Loader { | ||
|
||
@Alias | ||
public Target_URLClassPath$Loader(URL url) { | ||
} | ||
} | ||
|
||
@TargetClass(className = "jdk.internal.loader.URLClassPath$FileLoader") | ||
final class Target_URLClassPath$FileLoader { | ||
|
||
@Alias | ||
public Target_URLClassPath$FileLoader(URL url) throws IOException { | ||
} | ||
} | ||
|
||
@TargetClass(className = "jdk.internal.loader.URLClassPath") | ||
final class Target_jdk_internal_loader_URLClassPath { | ||
|
||
@Substitute | ||
private Target_URLClassPath$Loader getLoader(final URL url) throws IOException { | ||
String file = url.getFile(); | ||
if (file != null && file.endsWith("/")) { | ||
if ("file".equals(url.getProtocol())) { | ||
return (Target_URLClassPath$Loader) (Object) new Target_URLClassPath$FileLoader( | ||
url); | ||
} else { | ||
return new Target_URLClassPath$Loader(url); | ||
} | ||
} else { | ||
// that must be wrong, but JarLoader is deleted by SVM | ||
return (Target_URLClassPath$Loader) (Object) new Target_URLClassPath$FileLoader( | ||
url); | ||
} | ||
} | ||
|
||
} | ||
|
||
@Substitute | ||
@TargetClass(className = "sun.nio.ch.WindowsAsynchronousFileChannelImpl", innerClass = "DefaultIocpHolder") | ||
@Platforms({ Platform.WINDOWS.class }) | ||
final class Target_sun_nio_ch_WindowsAsynchronousFileChannelImpl_DefaultIocpHolder { | ||
|
||
@Alias | ||
@InjectAccessors(DefaultIocpAccessor.class) | ||
static Target_sun_nio_ch_Iocp defaultIocp; | ||
} | ||
|
||
@TargetClass(className = "sun.nio.ch.Iocp") | ||
@Platforms({ Platform.WINDOWS.class }) | ||
final class Target_sun_nio_ch_Iocp { | ||
|
||
@Alias | ||
Target_sun_nio_ch_Iocp(AsynchronousChannelProvider provider, Target_sun_nio_ch_ThreadPool pool) throws IOException { | ||
} | ||
|
||
@Alias | ||
Target_sun_nio_ch_Iocp start() { | ||
return null; | ||
} | ||
} | ||
|
||
@TargetClass(className = "sun.nio.ch.ThreadPool") | ||
@Platforms({ Platform.WINDOWS.class }) | ||
final class Target_sun_nio_ch_ThreadPool { | ||
|
||
@Alias | ||
static Target_sun_nio_ch_ThreadPool createDefault() { | ||
return null; | ||
} | ||
} | ||
|
||
final class DefaultIocpAccessor { | ||
static Target_sun_nio_ch_Iocp get() { | ||
try { | ||
return new Target_sun_nio_ch_Iocp(null, Target_sun_nio_ch_ThreadPool.createDefault()).start(); | ||
} catch (IOException ioe) { | ||
throw new InternalError(ioe); | ||
} | ||
} | ||
} | ||
|
||
class JdkSubstitutions { | ||
|
||
} |
Oops, something went wrong.