is it possible to make work javascript externs with emscripten?

Open
#1,261 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
25/100
Issue type
Feature
Clarity
Needs clarification
Activity status
Stale
Tech stack
cpp, wasm
Domain
compilers

Research direction

Start with the referenced src/canvas.c example and the Emscripten emscripten.h documentation to understand how EM_ASM is used. Then determine whether that approach can support JavaScript externs for the hxcpp wasm target and define the implementation scope and acceptance criteria.

Written by the indexing model from the issue text.

Description

It is possible to run JavaScript code directly using EM_ASM macros in Emscripten.
This approach could potentially provide a way to support JavaScript externs for the hxcpp wasm target.

https://github.com/alextyner/wasm-canvas/blob/38aa03df3c6656acd8dce5a92ef56afec5abb3bb/src/canvas.c#L15
https://emscripten.org/docs/api_reference/emscripten.h.html

Dominant language
C++
Stars
330
Forks
237
Avg merge
1d 3h
Merged PRs (30d)
20

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from HaxeFoundation/hxcpp

All issues in HaxeFoundation/hxcpp

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.