question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Allow compiled V8 binary as application entry-point.

See original GitHub issue

To protect sources, they are compiled with V8 and then executed using evalNWBin on a Window. In order to execute this however, you need to specify either a HTML or JS entry-point in package.json which then loads the compiled binary.

It would be beneficial to reduce the needed route here if we could simply specify a compiled V8 binary as the entry-point.

{
	"main": "source.bin"
}

I am not familiar with the internals of nwjs, so I am unsure if a Window context is specifically required before hand. If this is the case, then simply spawning a blank window without any HTML using window sub-fields defined in the package.json should be fine, which the user can then obtain with nw.Window.get() or such.

Overall, it would be nice to reduce the need for having to include a index.html which just contains <script>nw.Window.get().evalNWBin(frame, 'binary.bin');</script> when all bootstrapping is done in the compiled script.

Issue Analytics

  • State:open
  • Created 4 years ago
  • Reactions:2
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
NbrTDBcommented, Jan 29, 2020

Yeah it would be much tidier to be able to specify a binary directly in package.json. I feel like it’s worthwhile just for the convenience, if nothing else.

1reaction
rogerwangcommented, Jan 14, 2020

It would be the same as pointing main to a JS file with a single line of calling evalNWBin. So it could be done in the application…

Read more comments on GitHub >

github_iconTop Results From Across the Web

Compile v8 code, save in binary file and after then run stand ...
Hello all, Is possible following variants: 1. Compile v8 code, save in binary file specific by os and platform and after then run...
Read more >
Creating Javascript Binaries For Electron - Jeff Robbins
It allows you to convert your entire Javascript application codebase to binary before distribution. The caveats: Bytenode needs access to Node.
Read more >
V8 | Node.js v18 API
The v8.stopCoverage() method allows the user to stop the coverage collection started by ... This sets the entry point of the Node.js application...
Read more >
[v8,0/7] KVM: x86: Allow Qemu/KVM to use PVH entry point ...
For certain applications it is desirable to rapidly boot a KVM virtual machine. In cases where legacy hardware and software support within the...
Read more >
A simple guide to load C/C++ code into Node.js JavaScript ...
An Application Binary Interface is a way for a program to communicate with other compiled programs. This is a lot similar to an...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found