Skip to content

haskell-wasm/libffi-wasm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

libffi-wasm

Limited port of libffi to pure wasm32.

Note that this repo's issue tracker is closed; please report issues in ghc with the wasm tag instead.

Limitations compared to vanilla libffi

  • Function argument count is capped to 4
  • For each function type, closure count is capped to 16. Both constants can be tuned, and exceptions can be made for specific function types
  • Closure API is modified, closure alloc/prep is done in a single call
  • No support for structures or variadic functions yet

How to use

This is a Haskell cabal project, simply run the libffi-wasm executable. It'll generate additional C sources in cbits. Then include stuff in cbits for your own usage.

How?

See this blog post for details.

About

Read-only mirror of libffi-wasm on ghc gitlab

Resources

Stars

Watchers

Forks