[GH-ISSUE #13] Support for native code to be main() #7

Closed
opened 2026-05-05 10:58:47 -06:00 by gitea-mirror · 6 comments
Owner

Originally created by @pauldotknopf on GitHub (Jul 17, 2018).
Original GitHub issue: https://github.com/qmlnet/qmlnet/issues/13

Right now it is expected that .NET will be the entry point of the application.

Mono and .NET Core support hosting the runtime manually within native processes.

We should support a couple of headers that could be used to run a VM and configure .NET/Qml types from within main.cpp.

Originally created by @pauldotknopf on GitHub (Jul 17, 2018). Original GitHub issue: https://github.com/qmlnet/qmlnet/issues/13 Right now it is expected that .NET will be the entry point of the application. Mono and .NET Core support hosting the runtime manually within native processes. We should support a couple of headers that could be used to run a VM and configure .NET/Qml types from within main.cpp.
Author
Owner

@RichiCoder1 commented on GitHub (Aug 10, 2018):

I would love this actually. Would allow us to bootstrap our native video library, but do all the interesting business in C# & Qml.

<!-- gh-comment-id:411974136 --> @RichiCoder1 commented on GitHub (Aug 10, 2018): I would love this actually. Would allow us to bootstrap our native video library, but do all the interesting business in C# & Qml.
Author
Owner

@pauldotknopf commented on GitHub (Aug 10, 2018):

Yeah, this is one of the higher-priority tasks that I'd like to get done. I'll update this issue when I get to it, so stay subscribed.

<!-- gh-comment-id:411979821 --> @pauldotknopf commented on GitHub (Aug 10, 2018): Yeah, this is one of the higher-priority tasks that I'd like to get done. I'll update this issue when I get to it, so stay subscribed.
Author
Owner

@RichiCoder1 commented on GitHub (Aug 10, 2018):

Awesome! No pressure, I'm just amazed this project exists :). Keep up the good work and hopefully I can contribute at some point.

Have you thought about doing something like Refit and dynamically generating code rather than using reflection for interop-business? Would be cheaper and illink-able in theory.

<!-- gh-comment-id:411986102 --> @RichiCoder1 commented on GitHub (Aug 10, 2018): Awesome! No pressure, I'm just amazed this project exists :). Keep up the good work and hopefully I can contribute at some point. Have you thought about doing something like Refit and dynamically generating code rather than using reflection for interop-business? Would be cheaper and illink-able in theory.
Author
Owner

@pauldotknopf commented on GitHub (Aug 10, 2018):

Have you thought about doing something like Refit and dynamically generating code

Yup, see #39

Performance is totally acceptable ATM, but using Reflection.Emit would make it even better.

I've never seen/heard of Refit though, looks interesting.

<!-- gh-comment-id:411986720 --> @pauldotknopf commented on GitHub (Aug 10, 2018): > Have you thought about doing something like Refit and dynamically generating code Yup, see #39 Performance is totally acceptable ATM, but using ```Reflection.Emit``` would make it even better. I've never seen/heard of Refit though, looks interesting.
Author
Owner

@pauldotknopf commented on GitHub (Sep 3, 2018):

Waiting for feedback from the .NET team to decide how to implement this.

See: https://github.com/dotnet/core-setup/issues/4530

If that proposal isn't accepted, then I will manually include the source for core-setup in this repo, which would contain all the classes/tools/etc needed to resolve deps.json and runtimeconfig.json to produce a runtime similar to what you'd get when running the dotnet exec command.

<!-- gh-comment-id:418136842 --> @pauldotknopf commented on GitHub (Sep 3, 2018): Waiting for feedback from the .NET team to decide how to implement this. See: https://github.com/dotnet/core-setup/issues/4530 If that proposal isn't accepted, then I will manually include the source for core-setup in this repo, which would contain all the classes/tools/etc needed to resolve deps.json and runtimeconfig.json to produce a runtime similar to what you'd get when running the ```dotnet exec``` command.
Author
Owner

@pauldotknopf commented on GitHub (Sep 12, 2018):

Check this directory for documentation/samples on how to do this.

https://github.com/pauldotknopf/Qml.Net/tree/develop/samples/hosting

<!-- gh-comment-id:420808785 --> @pauldotknopf commented on GitHub (Sep 12, 2018): Check this directory for documentation/samples on how to do this. https://github.com/pauldotknopf/Qml.Net/tree/develop/samples/hosting
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/qmlnet#7
No description provided.