Skip to content

tweag/inline-js

Repository files navigation

inline-js: Call JavaScript from Haskell, and vice versa!

GitHub Actions Gitter Netlify Status

Documentation

Haddock documentation for HEAD is available.

Implemented features

  • Manage node sessions which run the eval server script for Haskell/JavaScript interop
  • Evaluate expressions with require()/import() support
  • Export Haskell functions to async/sync JavaScript functions
  • Load third party libraries in user-specified node_modules
  • Garbage-collected JSVal references in Haskell
  • Support Promise-based async evaluation
  • Type classes for Haskell/JavaScript data marshaling, with aeson support
  • Template Haskell QuasiQuoters for lifting Haskell variables into JavaScript code
  • Doesn't require node native addon or third party libraries

Planned features

  • Integrate with TypeScript compiler, generate Haskell code from TypeScript .d.ts code
  • Integrate with headless browser testing frameworks like playwright/puppeteer for running JavaScript in browsers

Supported versions

Supported GHC versions:

  • ghc-8.8, tested with ghc-8.8.4
  • ghc-8.10, tested with ghc-8.10.2

Supported platforms:

  • Windows 10 x64, tested with Windows Server 2019
  • Linux x64, tested with Ubuntu focal
  • macOS x64, tested with macOS Catalina

Supported node versions:

  • node-v10, minimum v10.20.0
  • node-v12 and later

See the CI config for details.

Contributors

inline-js is maintained by Tweag I/O.

Have questions? Need help? Tweet at @tweagio.

About

Call JavaScript from Haskell, and vice versa!

Resources

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published