Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to build Rust integration (similar to node-gyp) #654

Closed
LucaColonnello opened this issue Sep 1, 2018 · 3 comments
Closed

How to build Rust integration (similar to node-gyp) #654

LucaColonnello opened this issue Sep 1, 2018 · 3 comments

Comments

@LucaColonnello
Copy link

Hey guys,
I want to start thanking you for the effort.

This project seems very interesting and I like most of the choices that have been taken on the design.

I wanted to start play with it a little bit, maybe creating a simple server.

I noticed there’s seems to be no http library yet to do so, provided by Deno.

I thought to create a small Rust interface that will provide a server listen and some other stuff (request, response).

How could I achieve something like this user side (without compiling Deno myself)?

Maybe a similar approach to what node-gyp does?

Thanks in advance! :)

@NewLunarFire
Copy link

There are no native extensions in Deno yet. Deno uses message passing between a sandbox JS environment and the privileged part written in Rust. So you best bet for now is to implement your http library in Deno.

There are other ways you could write an http module without requiring a native module, like FastCGI or opening a socket on the proper port and handling the rest (Encryption, HTTP, etc.) in Typescript.

@ry
Copy link
Member

ry commented Sep 1, 2018

Hi @LucaColonnello. Just to echo @NewLunarFire - we indeed don't have a way to write native modules yet - nor http. These are both things we will tackle, if the project continues to grow. The later sooner than the former. You're welcome to help with building HTTP interfaces - but probably we need to do another cycle of refactors to the binding interfaces before starting on that.

@ry ry closed this as completed Sep 1, 2018
@LucaColonnello
Copy link
Author

LucaColonnello commented Sep 2, 2018 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants