jordwalke / native-reason-react-roadmap

Public design discussion about various approaches to building Native Reason React.
24 stars 1 forks source link

Dream Package Manager Workflow: #2

Open jordwalke opened 6 years ago

jordwalke commented 6 years ago

My dream workflow for building native apps would look something like this:

git clone myApp.git
cd myApp
esy install
esy build --target=armv7 --platform=ios-sdk
esy build --target=armv7 --platform=android-sdk

To add a dependency, you'd be able to simply add any opam package (or package hosted on npm) to package.json, and then rerun esy install && esy build --target...

Forking: You shouldn't need to fork packages in the common case. If we do in some cases, then we can possibly use a "resolutions" style field to consume those forks.

This is just an idea for the "dream workflow". In practice, we might need to compromise.

cc @rauanmayemir / @andreypopp

There's a lot to discuss about cross compilation, but let's keep this thread limited to the things that apply to Really Native React, or mobile.

rauanmayemir commented 6 years ago

I think our dev direction for esy is pretty close to what you're describing.

Can you elaborate on the use case for target and platform options? My thinking was that target would be a config with specific options, like specifying a separate build command for dune native/cross-target build or bucklescript make-world transpiler (plus target-specific deps).

I know it's too narrow, but I don't see a generalized way to build for any target platform yet.