Code Monkey home page Code Monkey logo

Comments (3)

kripken avatar kripken commented on July 17, 2024 1

A PR would definitely be welcome!

What information do you need, that you expected to see in a CONTRIBUTING file? (we can add that too if it would be generally useful)

from emsdk.

WilliamIzzo83 avatar WilliamIzzo83 commented on July 17, 2024

What information do you need, that you expected to see in a CONTRIBUTING file? (we can add that too if it would be generally useful)

Just wanted to know if there's anything a newcomer needs to know about the whole process or if there are any requirements to submit a PR (i.e. some repos requires a contributor licence agreement).

Anyways I guess I'll find out as we go 😄

About the issue at hand before attempting a fix I'd like to know more about the rationale of the implementation of this part of the linker_wrapper.py: why is there a set of valid file extensions in the first place? IIUC the outdir should contain the files generated by the compiler, so it seems to me that the implementation could be simplified by putting all files contained in the outdir in the list of files to be added to the files array. Am I missing something here?

Of course the easy way to fix the issue is to just add the .aw.js extension to the set mention before, but on the other hand I think simplifying the logic of the wrapper, if possible, can be more valuable in the long run. Maybe the original author of the rule, @walkingeyerobot, can give me more context.

Thanks!

from emsdk.

walkingeyerobot avatar walkingeyerobot commented on July 17, 2024

Of course PRs are welcome :)

The toolchain is much older than github history would lead you to believe. Originally, we wanted to build existing cc_binary targets under emscripten, so wasm_cc_binary was written as a wrapper rule that simply transitioned the cc toolchain. This means that the cc_binary is still the thing that does the actual building. cc_binary only has exactly one output, whereas emscripten outputs many files. To work around this, we put all emscripten's output files into a tarball, and then after everything is built wasm_cc_binary extracts this tarball and exposes all possible output files. Because bazel isn't capable of optional outputs (or at least wasn't at the time wasm_cc_binary was written), we needed to make sure all the files were created even if they were empty.

I suspect (but I'm not sure) that simplifying or eliminating this tarball process is possible but a huge amount of work. I would recommend just adding the .aw.js output file to the relevant scripts / rules.

from emsdk.

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.