FractalFir / FractalFir/rustc_codegen_clr

Support for SelfContainedDeployment [SCD] for executable projects

Open
#29 6 comments 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
2.1k
Forks
55
PR merge metrics
No merged PRs in 30d

Description

As part of back and forth on a [recent reddit thread](https://old.reddit.com/r/rust/comments/193llbd/the_rustc_backend_targeting_net_now_works_with/) where you got cargo integration (sort of) working by wrapping a shell script to `dotnet run %foo%.exe` the real assembly, I had pondered about a future state where if the rust project is a executable you by-default run the [Self Contained Deployment](https://learn.microsoft.com/en-us/dotnet/core/deploying/single-file/overview?tabs=cli) MSBuild tasks/target(s) to weave the final assembly into an actual ELF or PE.

I am not entirely sure where/what step this would take place at, nor off-hand the exact magical incantations desired to re-weave an existing CLR assembly to say ELF via MSBuild (or other dotnet API), but this would solve a few of the integration issues of this project into normal `cargo` flows. Note that `lib` and `dylib` etc projects could remain plain CLR assemblies, this would just be a thing for anything executable (or testable, etc).

I intended to poke-with-a-stick this idea in a few months, but also thought at least writing this down in case you or someone else gets inspired to try it out. I may be able to provide guidance here-and-there, I am far more familiar with the CLR/MSBuild side of the tooling world than rustc/cargo.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.