Questions tagged [ahead-of-time-compile]

19 questions
22
votes
2 answers

How to check the code is running in AOT in C#?

I am using compiled expressions to create instance. It is very fast in JIT but not in AOT (even slower) because of the fallback process. So I want to check whether the code is running in AOT. If yes, I will use ConstructorInfo.Invoke instead. ATM, I…
shtse8
  • 1,092
  • 12
  • 20
11
votes
3 answers

In Spring Boot 3 how to benefit from Spring AOT with a regular JVM application?

Spring Boot 3 will release in November 2022. The release candidate 2 has already been released. Spring Boot 3 will ship with Spring AOT. Spring AOT generates additional source code so that reflection calls will be avoided. Spring AOT was introduced…
Harold L. Brown
  • 8,423
  • 11
  • 57
  • 109
6
votes
0 answers

Run-time compilation with Roslyn - How to produce AoT compilation

I have been exploring run-time dynamic code compilation using c# with Roslyn. Using this answer on SO I have been able to complete an example that does what I want with the exception of one thing: It produces a dll which must then be invoked with…
Michael Jordan
  • 382
  • 2
  • 13
3
votes
3 answers

Is .NET 7 native AOT supported macOS?

There is no information about the macOS platform. Has AOT supported it, or is there any plan?
Echo
  • 183
  • 2
  • 11
2
votes
0 answers

Can you compile AOT when some assembly reference is missing?

First some background: we have an old assembly (let's call it InitialAssembly), later on we decide we need to add extra capability, but because this new feature is very large in scale we decide to add in a separate assembly (let's call it…
gichev
  • 21
  • 2
2
votes
1 answer

Can V8 perform build-time precompilation of JS code?

We're trying to optimize for start-up time of JS code on mobile and looking for the opportunities. I've found Facebook Hermes JS engine created for a similar purpose but we heavily depend on V8 at the moment. Can build-time precompilation be done…
4ntoine
  • 19,816
  • 21
  • 96
  • 220
2
votes
0 answers

Call extension module from extension module using Numba AoT

I develop complex math library in Python using numba. Any functions must support jit and aot. I have functions calling functions from another file. func1.py: from numba.pycc import CC from numba import njit cc =…
gearquicker
  • 571
  • 4
  • 18
1
vote
1 answer

AOT Blazor MAUI Hybrid

For Blazor WebAssembly we are using these settings for faster runtime as well as "fixing" a memory allocation issue on lower end devices: true
Smith5727
  • 402
  • 4
  • 15
1
vote
0 answers

How could I use protobuf-net in an AOT dll

In an AOT environment, NativeAOT reflection is something that can't be used (or at least it crashes for me, and they seem to suggest this is the case too). Is there an alternative way to utilize the library to deserialize proto messages? I can use…
RejectKid
  • 23
  • 2
1
vote
0 answers

General Numba AOT output files - can we generate C++ or Cython like files from an AOT compiled function?

Question: Looking for someone that is more familiar with Numba AOT and any "output intermediate files" option I haven't found yet. First off -> Pythran is a Python to C++ to PYD compiler. You can output the cpp files with a simple -e option to the…
Matt
  • 2,602
  • 13
  • 36
1
vote
0 answers

Ahead of Time Compilation for Cassandra

I have been trying to find a way to achieve Ahead of Time compilation for the Cassandra service (Which does some JIT Compilation by default). I see that Cassandra has been written in Java and it is open-source which has clear instructions to build…
1
vote
0 answers

"Attempting to JIT compile method while running in aot-only mode" Exception throwing after updating of protobuf-net

After updating to protobuf-net 3.0.101 from 2* version next exception start to throw on IOS xamarin project: Exception while deserializing protobuf message|System.ExecutionEngineException: Attempting to JIT compile method 'void…
Ilia
  • 11
  • 1
0
votes
1 answer

Unity UWP Vector3 AOT code not generated, JSON serialization

I'm working on a Unity project for the Hololens 2 which serializes user data and saves it as a json file to be accessed again later. What I have currently works fine when emulating in Unity but on the Hololens itself I get the following error when…
0
votes
1 answer

How can I avoid AOT build error during publish build in Blazor Wasm?

I have a Blazor Wasm app. There is a class FooData with several properties. public class FooData { public int Foo1 { get; set; } = -999; public double Foo2 { get; set; } = -999d; ... } And there is a class BarUnits public class BarUnits…
Flippowitsch
  • 315
  • 3
  • 15
0
votes
1 answer

Failed to AOT compile MyLibrary.dll, the AOT compiler exited with code 1 (ProjectName)

I have a MAUI application (.NET 7) referencing a custom class library (.dll) with an EF Core infrastructure (.NET 6) which nicely compiles and deploys in Debug mode on all platforms. Unfortunately, when I try to compile and pack it I get the…
1
2