prepare / Espresso

☕ Bridge your C# soul to the power of Javascript (V8 Javascript Engine / NodeJs)
MIT License
60 stars 11 forks source link

Question, are you compiling and including all of nodejs? #20

Open pauldotknopf opened 8 years ago

pauldotknopf commented 8 years ago

Are you compiling all of nodejs, but only exporting the V8 functions you need?

The reason why I ask is because I think this could potential allow running javascript code in .NET that actually utilize network/file and node_modules.

prepare commented 8 years ago

Yes

:)

prepare commented 8 years ago

The reason why I ask is because I think this could potential allow running javascript code in .NET that actually utilize network/file and node_modules.

👍 I 've test it, it works!

pauldotknopf commented 8 years ago

Wait, this is already a feature?

There is a JavaScript thread loop implemented in here?

I heard node was hard to embed, leading electron to for it.

https://github.com/electron/node

It wasn't hard for you? Or, are you using their fork?

prepare commented 8 years ago

Are you compiling all of nodejs, but only exporting the V8 functions you need?

In this Espresso repo, we use v8 from nodejs,

but It not include any function from node directly

because I want to use it with our HtmlRenderer project. so I want to show how to interface with the project, and make sure that no nodejs code/functions are on client platform.

so I export only V8 functions from nodejs + our some functions that control it.


Wait, this is already a feature? There is a JavaScript thread loop implemented in here?

Yes, but It's not in public repo , it will be release later soon.


It wasn't hard for you?

In my experience (not much like electron dev team) + my context, not hard, it's easy, we use the same technique like we use with V8.

prepare commented 8 years ago

are you using their fork?

No, I use the original nodejs code. :)

enginekit commented 7 years ago

hello @pauldotknopf,

Today, I have sent the special version of Espresso. It is "EspressoCup". The NodeJS + Espresso Extension. see detail more at

https://github.com/CompilerKit/Espresso/wiki/Build-NodeJS-for-Espresso-Cup

pauldotknopf commented 7 years ago

Amazing!

I know the API is different than EdgeJS, but how do you see this library, compared to it?

Also, is this repo your working fork? Is the CompilerKit one the home?

enginekit commented 7 years ago

@pauldotknopf I love the simplicity and flexibility of this lib.

(the detail in https://github.com/CompilerKit/Espresso/wiki/Build-NodeJS-for-Espresso-Cup shows that just 8 patches to original NodeJS code, the Espresso becomes EspressoCup)

I think, the Espresso is a little lib that answers my requests. I can't compare it EdgeJS ;) , (EdgeJS is a greate lib)

CompilerKit/Espresso is my fork. I contribute back to @prepare /Espresso

prepare commented 7 years ago

Now Espresso (V8/ NodeJS 7.10.0+) can run on .netcore/.netstandard on macOS, Linux and Windows. see => https://github.com/prepare/Espresso/issues/30