Use of ffi in emscripten build

Open
#876 3 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
20/100
Issue type
Feature
Clarity
Needs clarification
Activity status
Stale
Tech stack
wasm
Domain
embedded-iot

Research direction

Start with the Emscripten build instructions in the BUILDING document and investigate how Chez Scheme’s FFI interacts with SDL compiled for the web. The issue asks whether SDL can be loaded at runtime or included in the boot image, but names no source files or tests and does not establish a specific implementation goal. Done would require determining and documenting whether either approach works.

Written by the indexing model from the issue text.

Description

I have native code on an amd64 machine where I am able to use SDL via Chez's excellent FFI. I am exploring options for making the same code working in the browser. I am able to compile Chez for emscripten using instructions provided in the BUILDING document. Separately I am able to compile SDL for the web. Would appreciate any pointers on whether I could load the SDL wasm at runtime in the browser and bind to it or alternatively if in the emscripten build I could include it in the boot image. If this isnt possible, knowing that would be helpful too.

Dominant language
Scheme
Stars
7.4k
Forks
1k
Avg merge
1d 20h
Merged PRs (30d)
19

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 cisco/ChezScheme

All issues in cisco/ChezScheme

Similar issues

More Embedded & IoT issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.