facebook / facebook/hermes

Problems loading emscripten compiled js file in Hermes. Works on JSC/V8.

Open
#1,456 7 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
JavaScript
Stars
11.3k
Forks
859
Avg merge
1h 30m
Merged PRs (30d)
3

Description

## Bug Description

I've been trying to load an emscripten compiled file with hermes with no success.
First I thought it was the minification of the emscripten flags present but it's still the same result even with all minifications turned off.
The code works (minfied) on both V8 and JSC engine. Can you give me any hints on what could be changed to make it work and what is the core difference between Hermes and the others engines?

- [ x] I have run `gradle clean` and confirmed this bug does not occur with JSC
- [ x] The issue is reproducible with the latest version of React Native.

Using the latest(?) version of hermes with

React Native version: 0.73.4
OS: Any
Platform: IOS/ANDROID

## Steps To Reproduce

If you want to test it this is the file i'm trying to load.
https://github.com/kryptokrona/kryptokrona-crypto/blob/master/dist/turtlecoin-crypto.js (non-minified)

![image](https://github.com/facebook/hermes/assets/64911460/2e4f0e88-3111-4060-a01e-b2eea0016cff)

1. The output should be an object with functions.
2. Hermes can't find functions. ( with non-minified js)
![image](https://github.com/facebook/hermes/assets/64911460/e1fd61cb-26c4-4d1f-87aa-e00644c57347)

code example:

## The Expected Behavior

![image](https://github.com/facebook/hermes/assets/64911460/68825188-b60d-42ef-81f3-3c3bf125adc0)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.