Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

R2R, Single File and IL Link Trim support #490

Closed
gdmka opened this issue Oct 2, 2019 · 2 comments
Closed

R2R, Single File and IL Link Trim support #490

gdmka opened this issue Oct 2, 2019 · 2 comments

Comments

@gdmka
Copy link

gdmka commented Oct 2, 2019

Hi, do you have a roadmap of supporting new features from .NetCore 3?

I assume ReadyToRun may benefit general platform dependent script startup while Single File + Trimmed with the distribution of units of exection that do not depend on host .Net framework.

Given that, i cannot stress to ask if you plan to publish nuget packages that will not depend on .NETCoreApp 2.1 runtime?

@SlowLogicBoy
Copy link
Contributor

SlowLogicBoy commented Dec 9, 2019

Looks like Single File feature is already here and will be enabled by default (0.50.2, I got it from Build Artifacts)

Also +1 to Trimmed option (/p:PublishTrimmed=true).
But looks like Trimming might not work in dotnet-script case, cause dotnet-script uses reflection to run script code MethodInfo method = Assembly.LoadFrom(Path.Combine(Path.GetDirectoryName(Assembly.GetEntryAssembly().Location), "scriptAssembly.dll")).GetType("Submission#0").GetMethod("<Factory>");.

@gdmka
Copy link
Author

gdmka commented Dec 11, 2019

@SlowLogicBoy
According to various sources (e.g. Scott Hanselman) there's an IL Linker flag TrimmerRootAssembly specifying the assmeblies, types, methods that not need to be trimmed.
Given that, a trimmed script is feasible although it would cede the burden of describing the untrimmed atrifacts on an end user. So it's tricky.

But the R2R feature comes hand in hand with single file as i believe it should speed up the CLR stratup since and general scipt execution time because .Net Core isn't the platform for running C#/F# code as scripts.

@filipw can you elaborate please if Ready To Run is expected anytime?

@gdmka gdmka closed this as completed Aug 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants