Giter Club home page Giter Club logo

Comments (9)

waneck avatar waneck commented on May 30, 2024

One issue that we have with this is that the only way to query the system's platform is with Sys.systemName(). So we either return custom strings like LinuxARM, LinuxARMv10, etc, or we include a Sys.systemArchitecture().
But this would require adding this API to neko/hxcpp

from haxelib.

back2dos avatar back2dos commented on May 30, 2024

I really have very little Linux knowledge, but shouldn't fetching uname -a do the trick on linux systems? I guess we should just get a way to retrieve the "platform" that's exactly suited for haxelib's purposes and then see whether or how it should go back into std lib.

In all honesty, I practically never deal with native stuff, so there's little I can do to help here I'm afraid. Could you look into this? Or somebody else?

from haxelib.

TheHippo avatar TheHippo commented on May 30, 2024

I'm not familiar with the hxcpp build system, but since we have our own build tool which should be cross platform, why not solved this like node.js - npm / ruby - gem do it:

In the node.js world, if you like to ship a library (or module as they call it) you include a binding.gyp (example from the mongodb subproject bson) which trigger gyp to build the binary on your platform. As long as build tools (C/C++ compiler) are installed and all sources included the binary could be build after downloading the library the first time.

So if you have hxcpp installed and there is a buildNative.hxml (or whatever) in the root of the library start the compiler 😊

from haxelib.

waneck avatar waneck commented on May 30, 2024

wow, I really like how .gyp is so simple :) . Anyway, we've already got the hxcpp's build system, which uses an xml.
I think it would be a good way to have a standard location for it to be.
Also, for now many haxelibs already come bundled with their built ndlls. So maybe we can trigger the native rebuild only if the ndll is missing for the platform, don't you think?

from haxelib.

TheHippo avatar TheHippo commented on May 30, 2024

@waneck Yes it is indeed pretty simple and works quite well. But I assume hxcpp's build will do the same for us.

If binaries come bundles with the library the should be preferred, but without having any statistics on this, I strongly doubt that most library developers provide binaries for 6 (Win, Win64, Mac, Mac64, Linux, Linux64) or more platforms.

I agree with you on the topic what should happen if binaries come bundled, but to be realistic: If automatic build works no library author will ever boot multiple VMs to compile his library multiple times. 😀

Maybe add another command to haxelib: haxelib build libraryname and haxelib build libraryname --target targetname if some cross compiling is involved.

from haxelib.

waneck avatar waneck commented on May 30, 2024

some libraries are not so easy to build (e.g. NME), so it might still be necessary. (although it would be nice to have haxelib build download all native dependencies as well. NME's got the sdl-static dependency it has to build against).

I like having haxelib build libraryname for native builds!

from haxelib.

back2dos avatar back2dos commented on May 30, 2024

I've assigned this to you @waneck, since I haven't the slightest clue what to do about it.

from haxelib.

back2dos avatar back2dos commented on May 30, 2024

Any news on this @waneck ?

from haxelib.

waneck avatar waneck commented on May 30, 2024

No but it's now back into my mind. I'll think about a solution and propose here

from haxelib.

Related Issues (20)

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.