Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

create release for javascript #180

Open
biojppm opened this issue Dec 26, 2021 · 2 comments
Open

create release for javascript #180

biojppm opened this issue Dec 26, 2021 · 2 comments
Assignees
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@biojppm
Copy link
Owner

biojppm commented Dec 26, 2021

Since emscripten is now supported, I'd like to create the javascript artifacts as part of the release workflow.

Also, a quick JS usage example in the main README is needed.

@cschreib could you kick this off? I don't know much about JS or JS packaging, so maybe it would be better if you kick this off. I'd be happy to join in after the first changes. If you're currently taken and that is too much, could you at least provide some pointers on how to package?

@biojppm biojppm added enhancement New feature or request help wanted Extra attention is needed labels Dec 26, 2021
@biojppm biojppm assigned biojppm and unassigned biojppm Dec 26, 2021
@cschreib
Copy link

I am not terribly experienced with this myself, but I can share whatever wisdom I've acquired along the way.

When you compile a library with Emscripten, all you get is a linux-standard .a file. I have never attempted to produce a shared library, and I don't know that such a concept even exists there. The .a file contains (to the best of my knowledge) the C++ code compiled into WASM binary. There is no JavaScript at this point. So, for a library, I would expect to deploy just the headers and the .a file(s), as this is what a user would consume to build their own C++/WASM applications.

As for applications themselves, you always need JavaScript to launch and manage the WASM code (how to handle memory; etc). At the lowest level, Emscripten can emit a .js file that will allow running the WASM entry point (main(), and the other functions explicitly exported to JavaScript, presumably, although I've never done this). It can also emit a combination of .js (loader), .wasm (code), .data (runtime input data; will be used to create an emulated file system to load stuff from) and .html (calls JS and setup canvas for rendering output). I don't think the rapidyaml fits in this, thought?

@mnahkies
Copy link

mnahkies commented Apr 3, 2024

I'm unlikely to get time to figure this out anytime soon, but just wanted to express interest in having more documentation around the WASM support, and in a perfect world bindings for NodeJS to make it easy to use from Javascript code.

I currently use https://www.npmjs.com/package/js-yaml which works fine, but for my particular project parsing large YAML files makes up a large chunk of my integration test suite runtime (50%-60%) of total runtime, and I'd love to benchmark rapidyaml as an alternative

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants