$30 off During Our Annual Pro Sale. View Details »

.NET 9アプリをCGIとして レンタルサーバーで動かす

.NET 9アプリをCGIとして レンタルサーバーで動かす

Mayuki Sawatari

November 29, 2024
Tweet

More Decks by Mayuki Sawatari

Other Decks in Programming

Transcript

  1. OS Linux (FreeBSD) FreeBSD NativeAOT .NET FreeBSD ( ) 13.0-RELEASE

    Azure 13.0-RELEASE VM pkg install libc OS $ uname –a FreeBSD mayuki-testvm-3 13.0-RELEASE-p7 FreeBSD 13.0-RELEASE-p7 #0 releng/13.0-n244776-e5733e6d904: Tue Feb 15 04:09:03 UTC 2022 root@build-13-0:/usr/obj/usr/src/amd64.amd64/sys/GENERIC amd64 $ dotnet new console Failed to load /usr/local/dotnet/shared/Microsoft.NETCore.App/8.0.6/libcoreclr.so, error: /lib/libc.so.7: version FBSD_1.7 required by /usr/local/dotnet/shared/Microsoft.NETCore.App/8.0.6/libcoreclr.so not found Segmentation fault (core dumped)
  2. XREA( )/ It works! ! InvariantGlobalCulture true (Native AOT true)

    glibc 2.28 (CentOS Stream 8 ) RuntimeHostConfigurationOption System.GC.HeapCount 1 HeapCount httpd (SSH )
  3. ASP .NET Core CGI Misuzilla.AspNetCore.Server.Cgi Microsoft.AspNetCore.Hosting.Server.IServer ( ) CGI https://github.com/mayuki/Misuzilla.AspNetCore.Server.Cgi

    ASP .NET Core / CGI …! ASP.NET Core Minimal API ASP.NET Core Web (Razor Pages ) UseKestrel, UseIIS, UseHttpSys builder.WebHost.UseCgi();
  4. Native AOT + ASP .NET Core Minimal API 250-300ms JIT

    + Self-contained + ASP .NET Core Razor Pages 1 ( )
  5. ASP .NET Core CGI ! Native AOT .NET CGI !

    bit.ly/dotnetnewcgidemo ( )
  6. XREA/ SSH httpd SSH httpd Native AOT Native AOT OS

    Aarch64 Linux linux-x64 (Windows )