Git Product home page Git Product logo

finite.cpp.sdk's People

Contributors

finitereality avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

subodhmk bubdm

finite.cpp.sdk's Issues

Two way C# <-> C/C++ bindings

Two-way bindings without much hassle should be possible, eventually. I think this will likely take the form of a separate package reference to extend the build based on which SDK is being used.

For sharing types between managed and unmanaged, there are multiple routes that would likely need to be taken:

  • Generate C# types and methods from existing C/C++ code (a la ClangSharp - https://github.com/Microsoft/ClangSharp) when referencing a C/C++ library from C#
  • Generate C/C++ types and methods from the C# types, failing if the types are not blittable (a la DNNE) when referencing a C# library from C/C++

Some examples of the desired XML:

<Project Sdk="Finite.Cpp.Sdk">
  <ItemGroup>
    <PackageReference Include="Finite.Cpp.Sdk.DotNetExports" />
  </ItemGroup>
  <ItemGroup>
    <ProjectReference Include="path/to/project.csproj" GenerateExports="true" />
  </ItemGroup>
</Project>
<Project Sdk="Microsoft.NET.Sdk">
  <ItemGroup>
    <PackageReference Include="Finite.Cpp.Sdk.NativeExports" />
  </ItemGroup>
  <ItemGroup>
    <ProjectReference Include="path/to/project.cxxproj" GenerateExports="true" />
  </ItemGroup>
</Project>

Project file extensions

What file extensions do we want for C/C++ projects?

  • vcxproj might be compatible with existing systems, but will likely blow everything else up. MSFT might also not be happy that we stole their extension
  • cproj and cxxproj are incompatible with everything current, but this guarantees we aren't stepping on anybody's feet
  • However, we could just use a single project type for both C/C++...

Compilation support

Because this would be totally useless without this! :)

Overall idea so far is to separate compile and link into separate steps to allow incremental builds. Tasks under src/Tasks/ roughly follow this.

Open questions:

  • How do we expose compiler options to the user?
    • NativeCXX.targets mockup from Thermite has very platform-dependent options
    • But if we expose platform-independent options (e.g. <StandardVersion>c++17</StandardVersion> we'd need some database mapping these options)
  • Reproducible/deterministic builds? (Super stretch goal)
  • How do we want to use "standard" MSBuild properties?
  • How do we reflect these in #2 for packaging?

Correctly set RUNPATH on Linux

Right now it's just set to $ORIGIN, which works in a lot of cases, but probably won't work in all cases (e.g. dynamically loaded plugins)

Visual Studio support

We'll need to write a CPS... something or other for this. I'm not the most familiar with Visual Studio internals, so my efforts until now have mostly been focused on the .NET and MSBuild command line.

Compiler detection engine

Goal is to have something comparable to CMake, so the information we need to detect is:

  • Path
  • Version
  • Supported architecture(s)
  • Supported features/standards (C++17, C99, GNU C, etc.)
  • Whether the compiler works (compile a test program)
  • Word size/similar (can be done using above test program)

Packaging support

How do we want to do packages? There are three options I see:

  • NuGet (would this require NuGet to support us? I can't figure out how their MSBuild machinery works)
    • how do we redistribute code? Source form or glorified LLVM IR?
    • Licensing is fairly simple thanks to NuGet's built in support
  • Vcpkg (integrates natively with MSBuild, so might be easy)
    • Everything's in a monorepo distributed by source
    • Licensing is ????
  • A whole new system from the ground up because Not Implemented Here:tm:

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.