Coder Social home page Coder Social logo

3dfxuser / avaloniacorertdemo Goto Github PK

View Code? Open in Web Editor NEW

This project forked from teobugslayer/avaloniacorertdemo

0.0 0.0 0.0 280 KB

A sample showing how to use Avalonia UI and CoreRT

License: MIT License

Shell 2.79% C# 96.81% Batchfile 0.40%

avaloniacorertdemo's Introduction

This project shows how to integrate Avalonia UI and NativeAOT (previously CoreRT). Both projects are under heavy development, have sparce documentation, and require subtle knowledge spread across multiple sources. Using this project, you will learn how to develop using both frameworks. You may also use it as a starting point for your projects.

System requirements

This project is tested only under Windows, and this readme assumes you are using Windows. To build this project, you need:

  • Any supported 64-bit edition of Windows. NativeAOT requires 64-bit Windows and produces only 64-bit Windows apps.
  • Visual Studio. VS 2022 Community is free for personal use. Get if from here. When installing Visual Studio, select .NET desktop development and Desktop development with C++ workloads. To generate native code, NativeAOT requires the native C++ toolchain and Windows SDK. This configuration ensures you have them.
  • .Net 7.0 SDK. Download it from here. Note: Make sure that you download and install the SDK. The runtime is not enough for building apps.
  • Git. Install Git for Windows.

Getting started

Get the source code

After you have installed the prerequisites, your first step is to get the source code:

  1. From the Windows Start menu, start x64 Native Tools Command Prompt for VS 2022. This configures the development environment with 64-bit dev tools, which NativeAOT requires to build your apps.
  2. Get the sample project. Go to your terminal, and clone it:
git clone [email protected]:teobugslayer/AvaloniaCoreRTDemo.git
cd AvaloniaCoreRTDemo

Then, build the sample:

dotnet publish -r win-x64 -c release

Note: Avalonia and NativeAOT are huge and downloading their NuGet packages may take some time. During this period, which happens on the first build, and when NativeAOT releases a new version, it will look like nothing happens. Just be patient.

We are ready - In your terminal, navigate to src\bin\Release\net6.0\win-x64\publish, and start AvaloniaCoreRTDemo.exe - it should work!

Further development

Feel free to use this sample as a base for your projects.

This project is configured to help you debug issues with publishing. Before publishing, check the CSPROJ file and modify the various Ilc* properties according to Optimizing programs targeting Native AOT document.

Artifact test

For any change in this repo we will build the artifact for Windows-x64, Linux-x64 and macOS-x64. You can download them from workflows run results. For run the artifact on macOS make sure to allow the application in System Preferences, Security & Privacy, General.

avaloniacorertdemo's People

Contributors

josephmoresena avatar teobugslayer avatar maxkatz6 avatar kant2002 avatar jkotas avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.