FStar icon indicating copy to clipboard operation
FStar copied to clipboard

I made .NET F# package for F*. Shall I merge?

Open WhiteBlackGoose opened this issue 2 years ago • 6 comments

Hello. Awesome work!

I wanted to compile it to F#, but it'd need git submodules and not very nice. So I decided to make a nuget package, see repo.

It's very easy to use (just adding the package as PackageReference). Here's example of a repo using this lib (see codegen.ps1).

I know there's some work making such a lib. But it included soucre files and some old targeting dlls. Instead, I suggest targeting netstandard2.0, have a new SDK-style proj file.

So, if you like the idea, I can try to add the package into this repo.

WhiteBlackGoose avatar Feb 12 '22 10:02 WhiteBlackGoose

@WhiteBlackGoose hi! anything related to packaging F* for usage in .net & F# environment is really interesting.

I wanted to point at those issues, in case you haven't dug into it:

  • #2278
  • #2298

smoothdeveloper avatar Feb 12 '22 11:02 smoothdeveloper

@smoothdeveloper yes I've seen them. This package looks packed wrong, that's why I'm suggesting mine. I mean... it doesn't matter if it's mine or not, but the key is, would you like it to be repacked the way I pack it? Just like a regular F# lib

WhiteBlackGoose avatar Feb 12 '22 11:02 WhiteBlackGoose

I don't know how things are shifting with this repository tooling outside of OCaml toolchain, and latest F# versions deprecates stuff that implies there will be changes to occur here, eventually.

Despite things look headed like tearing appart overall, for now, I believe it would be worth to have a version of F*, up to date, released as nuget packages, and an ecosystem to build libraries with the bells & whistles F* provides that can be consumed in more general .NET projects.

It requires lots of effort around learning msbuild / .net sdk and of course, how this repository / compiler primarily works.

@7sharp9 have you played with this repository / compiler a bit?

smoothdeveloper avatar Feb 12 '22 11:02 smoothdeveloper

Sorry no, I’ve used F* a little bit but not done anything than skim the compiler code.

Sent from my iPhone

On 12 Feb 2022, at 11:17, Gauthier Segay @.***> wrote:

 I don't know how things are shifting with this repository tooling outside of OCaml toolchain, and latest F# versions deprecates stuff that implies there will be changes to occur here, eventually.

Despite things look headed like tearing appart overall, for now, I believe it would be worth to have a version of F*, up to date, released as nuget packages, and an ecosystem to build libraries with the bells & whistles F* provides that can be consumed in more general .NET projects.

It requires lots of effort around learning msbuild / .net sdk and of course, how this repository / compiler primarily works.

@7sharp9 have you played with this repository / compiler a bit?

— Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android. You are receiving this because you were mentioned.

7sharp9 avatar Feb 17 '22 01:02 7sharp9

@mateuszbujalski , any thoughts about this? You have done some similar work

nikswamy avatar Mar 16 '22 23:03 nikswamy

@nikswamy I think that packaging F* as a nuget for easy consumption is important for the .net part of the community.

My work is still an open PR. I believe it was pretty close to getting merged and running on CI. It probably did rot a bit with time though. I believe my solution was a bit more general and supported more use cases. It could also be consumed from both .net framework and .net standard projects. It probably could do a bit better job at filtering out not needed parts of F* binary package though, to make the package smaller.

I stopped pushing for it at some point as the project that was the main force driving my efforts died unfortunately and I've moved on since then. I also didn't have that much time to play around as quite a lot has been going on for me on the private side of things.

Nevertheless, if you're willing to get nuget packaging merged, I'm happy to revive my solution, improve it based on @WhiteBlackGoose feedback so his use case is supported (if it isn't already) and maintain it long term.

mateuszbujalski avatar Mar 17 '22 08:03 mateuszbujalski