Giter Site home page Giter Site logo

dotnet-native-lib's Introduction

.NET Library for Native Apps

dotnet AOT support is now out, this project will be archived as it is now officially suported

Steps from scratch

  • Create a new project
    dotnet new classlib -o DotNetLib
  • add NativeAOT support by creating a nuget config
    cd DotNetLib
    dotnet new nugetconfig
  • Add the following to the nuget.config file:
    <add key="dotnet-experimental" value="https://pkgs.dev.azure.com/dnceng/public/  _packaging/dotnet-experimental/nuget/v3/index.json" />
  • add a reference to the compiler
    dotnet add package Microsoft.DotNet.ILCompiler -v 7.0.0-*
  • then you can publish the dll like this
    dotnet publish /p:NativeLib=Shared /p:SelfContained=true -r <RID> -c <Configuration>

Cpp steps

  • make and build the native executable
    meson builddir
    meson compile -C builddir
  • put the library in the executable generated by meson (buiddir/cpp)
  • run it
    ./builddir/bin/<executable>

dotnet-native-lib's People

Contributors

unixy2k avatar

Watchers

James Cloos avatar  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.