NFunctions 0.0.1-preview

This is a prerelease version of NFunctions.
dotnet add package NFunctions --version 0.0.1-preview                
NuGet\Install-Package NFunctions -Version 0.0.1-preview                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="NFunctions" Version="0.0.1-preview" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add NFunctions --version 0.0.1-preview                
#r "nuget: NFunctions, 0.0.1-preview"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install NFunctions as a Cake Addin
#addin nuget:?package=NFunctions&version=0.0.1-preview&prerelease

// Install NFunctions as a Cake Tool
#tool nuget:?package=NFunctions&version=0.0.1-preview&prerelease                

NFunctions (alpha)

NFunctions is a C# open source serverless function framework that aims to free your code from AWS Lambda or Azure Functions boilerplate code while still leveraging those FaaS services.

You just use NFunctions agnostic attributes to tag your function handler methods and define their triggers. NFunctions source generator then automatically generates the AWS Lambda or Azure boilerplate code for you based on the NFunctions cloud provider NuGet package you've added to your project: NFunctions.AWS or NFunctions.Azure.

A typical NFunctions handler method looks like the below code. The NFunctions attribute tags your method as a function handler method. You can pass the name of the function to attribute. The HttpTrigger attribute defines that the function exectution is triggered by a GET http request.


    public class NFunctionsOnAWSLambda
    {
        [NFunctions("Get")]
        [HttpTrigger(NFunctions.Http.HttpMethod.GET, "api")]
        public HttpTriggerReponse MyFirstFunction(IHttpTriggerRequest request)
        {
            return new HttpTriggerReponse(System.Net.HttpStatusCode.OK, "Hello from NFunction");
        }

    }

Samples

In the samples folder, you have two sample projects that showcase that the same source code can be deployed seamlessly on AWS or Azure. You just have to open the NFunctionsSamples solution and build the projects. If you use Visual Studio 2022, you can use the AWS Toolkit extension to deploy on AWS or the built-in Azure tooling to deploy on Azure.

Source code

In the src folder, you have the NFunctions solution that you can use to explore and build the NFunctions NuGet packages.

Project status

This project is in its early stage. It aims at exploring the art of possible to abstract your serverless function code away from AWS Lambda and Azure Functions without sacrifiying to Kubernetes.

How to provide feedback

We are looking for feedback. Please, open an issue to record your feedback in our GitHub repository.

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • .NETStandard 2.0

    • No dependencies.

NuGet packages (3)

Showing the top 3 NuGet packages that depend on NFunctions:

Package Downloads
NFunctions.AWS

NFunctions is a C# open source serverless function framework that aims to free your code from AWS Lambda or Azure Functions boilerplate code while still leveraging those FaaS services. NFunctions.AWS package contains the AWS specific model definitions.

NFunctions.Generator

NFunctions is a C# open source serverless function framework that aims to free your code from AWS Lambda or Azure Functions boilerplate code while still leveraging those FaaS services. NFunctions.Generator package contains the source generator.

NFunctions.Azure

NFunctions is a C# open source serverless function framework that aims to free your code from AWS Lambda or Azure Functions boilerplate code while still leveraging those FaaS services. NFunctions.Azure package contains the Azure specific model definitions.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
0.0.1-preview 52 9/26/2024