fsharp icon indicating copy to clipboard operation
fsharp copied to clipboard

[Feature] Packaging FSX files as standalone application

Open kant2002 opened this issue 3 years ago • 2 comments

Is your feature request related to a problem? Please describe.

FSX as a scripts sometimes grow to size where they are neither programs, nor simple scripts. Something which you want to show to your manager, or even give you some other employees. Because they are small, you really don't want to have overhead of project for managing these apps.

Describe the solution you'd like

Example usage

dotnet fsi myscript.fsx --publish --self-contained 

You may even try NativeAOT this way

dotnet fsi myscript.fsx --publish --self-contained -r win-x64 /p:PublishAot=true 

Concidentally this is good way to test for stale FSX files which has broken paths to references here and there.

I think this can fill some gap F# usage.

Additional context

As prototype I have very simple tool

dotnet tool install --global FSharpPacker
fspack FSharpPacker.Tests\Samples\LoadFile.fsx --self-contained -o test
test\LoadFile.exe

https://github.com/kant2002/FSharpPacker/

kant2002 avatar Sep 22 '22 16:09 kant2002

I'm a big F# script fan, I have dozens of gists with graphs/visualization/automation/user deletion/sso creation/etc

And I share those scripts often enough to feel the pain that the other side must have a dotnet-sdk installed (not even a runtime!)

That feature would allow me to share my work with colleagues without

  • me converting every file to a project
  • them installing dotnet-sdk

Szer avatar Sep 22 '22 16:09 Szer

related: #13341

smoothdeveloper avatar Sep 22 '22 18:09 smoothdeveloper

Treating as a duplicate of #13341

dsyme avatar Sep 23 '22 13:09 dsyme