Is there any way to interop with JS in Zig/RS/C/C++?

This page summarizes the projects mentioned and recommended in the original post on /r/Zig

Our great sponsors
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • SaaSHub - Software Alternatives and Reviews
  • mach

    zig game engine & graphics toolkit

  • Still experimental - I haven't had a chance to do a proper write-up, publish this as a standalone repository, or provide examples.. but we have mach/sysjs which is a library that enables calling JS from Zig.

  • vecty

    Vecty lets you build responsive and dynamic web frontends in Go using WebAssembly, competing with modern web frameworks like React & VueJS.

  • It draws on Go's syscall/js library as inspiration, which is pretty powerful (I wrote a pretty popular React-like framework using it a while back.)

  • WorkOS

    The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.

    WorkOS logo
  • zig-nodejs-example

    Node.js Native Module written in Zig

  • But if you want to interop with server side JS (nodejs) the easiest way would be to write a native add on. Node provides a c api which you can use from zig. Here's an example (not mine).

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts