Skip to content
This repository was archived by the owner on Mar 24, 2026. It is now read-only.

Commit 9805e9e

Browse files
authored
Update to .NET 10 and Suave latest version (#10798)
* Update to .NET 10 and Suave latest version * add myself to maintainers * webserver: Suave
1 parent 4871fe5 commit 9805e9e

4 files changed

Lines changed: 11 additions & 12 deletions

File tree

frameworks/FSharp/suave/benchmark_config.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"framework": "suave",
3+
"maintainers": ["ademar"],
34
"tests": [
45
{
56
"default": {
@@ -14,7 +15,7 @@
1415
"flavor": "None",
1516
"orm": "None",
1617
"platform": ".NET",
17-
"webserver": "None",
18+
"webserver": "Suave",
1819
"os": "Linux",
1920
"database_os": "Linux",
2021
"display_name": "Suave",
Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
<Project Sdk="Microsoft.NET.Sdk">
1+
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
44
<OutputType>Exe</OutputType>
5-
<TargetFramework>net7.0</TargetFramework>
5+
<TargetFramework>net10.0</TargetFramework>
66
<ServerGarbageCollection>true</ServerGarbageCollection>
77
<!-- Settings applicable to JIT-based deployment -->
88
<TieredPGO>true</TieredPGO>
@@ -13,8 +13,7 @@
1313
</ItemGroup>
1414

1515
<ItemGroup>
16-
<PackageReference Include="Suave" Version="2.6.2" />
17-
<PackageReference Update="FSharp.Core" Version="7.0.0" />
16+
<PackageReference Include="Suave" Version="3.2.*" />
1817
</ItemGroup>
1918

2019
</Project>

frameworks/FSharp/suave/src/App/Program.fs

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
open Suave
2-
open Suave.Filters
32
open Suave.Operators
3+
open Suave.Router
44
open Suave.Json
55

66
open System.Net
@@ -9,11 +9,10 @@ open System.Runtime.Serialization
99
[<DataContract>]
1010
type JsonMessage = { [<field:DataMember(Name = "message")>] message: string }
1111

12-
let app =
13-
choose [
14-
path "/plaintext" >=> Writers.setMimeType "text/plain; charset=utf-8" >=> Successful.OK "Hello, World!"
15-
path "/json" >=> Writers.setMimeType "application/json; charset=utf-8" >=> Successful.ok (toJson { message = "Hello, World!"})
16-
]
12+
let app : WebPart = router {
13+
get "/plaintext" (Writers.setMimeType "text/plain; charset=utf-8" >=> Successful.OK "Hello, World!")
14+
get "/json" (Writers.setMimeType "application/json; charset=utf-8" >=> Successful.ok (toJson { message = "Hello, World!"}))
15+
}
1716

1817
let cfg = { defaultConfig with bindings = [ HttpBinding.create HTTP IPAddress.Any 8080us ] }
1918

frameworks/FSharp/suave/suave.dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM mcr.microsoft.com/dotnet/sdk:7.0.100
1+
FROM mcr.microsoft.com/dotnet/sdk:10.0
22
WORKDIR /app
33
COPY src/App .
44
RUN dotnet publish -c Release -o out

0 commit comments

Comments
 (0)