Skip to content

Rust Interoperability similar to napi-rs for Node JS #8

Closed

Description

@izznat

This idea is really cool! Thanks for your work on it.

It will be great if TypescriptBC have some kind of rust interoperability through something like NodeJS native api. So, we could use the wide ecosystem of Rust libraries when we need to.

Maybe it also be possible to expose rust crate directly as TypscriptBC module but I imagine it will be really hard. So, something like NodeJS native api will suffice.

Activity

  1. alshdavid commented on Sep 30, 2021

    @alshdavid
    Collaborator

    Thanks for your support! I have yet to get to the part of the spec where I consider interoperability with external modules. You're definitely right in that there is massive value from being able to consume crates from Rust as there is a massive ecosystem there.

    I will look into Node's native API and gain a better understanding of what that would look like syntactically. Leaning on a Rust crate might be a good way to introduce the first http server library to the project.

  2. vjpr commented on Oct 5, 2021

    @vjpr

    napi-rs recently introduced the #[napi] macro that automatically generates Rust bindings for JS.

    I think this is the best approach for interop. If BS could interop with C-style libs, then its just a matter of building a Rust as a C shared lib.

  3. locked and limited conversation to collaborators on Feb 17, 2023
  4. converted this issue into a discussion #80 on Feb 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions