From 930be83656eb0e6dc968f672e889d43aaa166550 Mon Sep 17 00:00:00 2001 From: ruki Date: Thu, 19 Mar 2026 23:15:48 +0800 Subject: add native aot --- tests/projects/csharp/native_aot/src/cslib/MathLib.cs | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 tests/projects/csharp/native_aot/src/cslib/MathLib.cs (limited to 'tests/projects/csharp/native_aot/src/cslib/MathLib.cs') diff --git a/tests/projects/csharp/native_aot/src/cslib/MathLib.cs b/tests/projects/csharp/native_aot/src/cslib/MathLib.cs new file mode 100644 index 000000000..83255a4b3 --- /dev/null +++ b/tests/projects/csharp/native_aot/src/cslib/MathLib.cs @@ -0,0 +1,9 @@ +using System.Runtime.InteropServices; + +public static class MathLib { + [UnmanagedCallersOnly(EntryPoint = "cs_add")] + public static int Add(int a, int b) => a + b; + + [UnmanagedCallersOnly(EntryPoint = "cs_multiply")] + public static int Multiply(int a, int b) => a * b; +} -- cgit v1.3.1