https://github.com/kant2002/fstarmsbuildsdk
F* MSBuild SDK
https://github.com/kant2002/fstarmsbuildsdk
fstar msbuild-sdk
Last synced: about 1 year ago
JSON representation
F* MSBuild SDK
- Host: GitHub
- URL: https://github.com/kant2002/fstarmsbuildsdk
- Owner: kant2002
- License: mit
- Created: 2022-07-27T05:47:50.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2024-09-10T02:32:54.000Z (almost 2 years ago)
- Last Synced: 2025-04-29T22:58:40.147Z (about 1 year ago)
- Topics: fstar, msbuild-sdk
- Language: F*
- Homepage:
- Size: 90.8 KB
- Stars: 8
- Watchers: 2
- Forks: 0
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# F* SDK
This is MSBuild SDK for F*.
## Use templates
```shell
dotnet new --install FStarLang.DotNet.Common.ProjectTemplates.1.0::0.1.0 --nuget-source https://codevision.pkgs.visualstudio.com/FStarLang/_packaging/fstarlang/nuget/v3/index.json
```
Then you can create project using
```shell
dotnet new fstarconsole -o helloworld
```
## Manually convert F# project
Create new Nuget.config using `dotnet new nugetconfig`
Paste in that file following configuration file.
```xml
```
Create new F# project and replace it with following content.
```xml
net6.0
```
Also rename Program.fs to Program.fst and now you can run your code using `dotnet run`. That's it folks!
## Development
For creation of new version of SDK
- bump version in the `src\sdk\FStarLang.Sdk.csproj`
- run
```sh
dotnet build -c Release src/sdk/FStarLang.Sdk.csproj /p:ReleaseBuild=true
```
- publish Nuget file located at `src\sdk\bin\Release`
```
dotnet nuget push --source fstarlang --api-key $ApiKey artifacts/package/release/FStarLang.Sdk.0.2.0.nupkg
```
- Go back to root of the project
- bump version in the `src/runtime/FStarLang.Runtime.csproj`
- Change `FStarCompilerVersion` to latest F* compiler release in the `src/runtime/FStarLang.Runtime.csproj`
- run
```sh
dotnet build -r win-x64 -c Release src/runtime/FStarLang.Runtime.csproj /p:ReleaseBuild=true
dotnet build -r linux-x64 -c Release src/runtime/FStarLang.Runtime.csproj /p:ReleaseBuild=true
```
- publish Nuget file located at `src\sdk\bin\Release`
```
dotnet restore src/sdk/FStarLang.Sdk.csproj --interactive
dotnet nuget push --source fstarlang --api-key $ApiKey artifacts/package/release/FStarLang.Compiler.runtime.win-x64.0.0.7.nupkg
dotnet nuget push --source fstarlang --api-key $ApiKey artifacts/package/release/FStarLang.Compiler.runtime.linux-x64.0.0.7.nupkg
```
- Go back to root of the project
- bump version in the `src/templates/FStarLang.DotNet.Common.ProjectTemplates.1.0.csproj`
- run
```sh
dotnet pack -c Release src/templates/FStarLang.DotNet.Common.ProjectTemplates.1.0.csproj /p:ReleaseBuild=true
```
- publish Nuget file located at `src\sdk\bin\Release`
```
dotnet nuget push --source fstarlang --api-key $ApiKey artifacts/package/release/FStarLang.DotNet.Common.ProjectTemplates.1.0.0.1.2.nupkg
```