Closed lithiumtoast closed 3 years ago
You can avoid to specify all .cs files.
Just do a cd <your proj path>
and then bflat build
.
It will take the whole source code
I don't have plans to add csproj/MSBuild/NuGet support - I'm not trying to replicate dotnet
.
Like @andreakarasho wrote above - bflat build
will build all *.cs source files in the directory, recursively.
If you need more control than that, you're better off using dotnet with the NativeAOT NuGet package: https://github.com/dotnet/runtimelab/tree/feature/NativeAOT/samples/HelloWorld
You can configure NativeAOT through this mechanism to get pretty close to bflat: https://github.com/dotnet/runtimelab/blob/feature/NativeAOT/docs/using-nativeaot/optimizing.md
At that point the only difference is:
If you need more control than that, you're better off using dotnet with the NativeAOT NuGet package
I went this path.
bflat can produce a bit smaller executables
With all the options turned on to get a small as possible binary using the nAOT NuGet package, the difference in my testing was only a few hundred kilobytes (~400).
Would it be possible to use a
.csproj
as input instead of listing all the.cs
files?