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

Fuse NEON technology => https://neon-bindings.com/ #3

Closed
usagi opened this issue Mar 20, 2020 · 21 comments
Closed

Fuse NEON technology => https://neon-bindings.com/ #3

usagi opened this issue Mar 20, 2020 · 21 comments

Comments

@usagi
Copy link
Owner

usagi commented Mar 20, 2020

From reddit: https://www.reddit.com/r/rust/comments/flsoa0/templaterustbackendwithelectronfrontend_released/fl0dv4p/

image

@usagi
Copy link
Owner Author

usagi commented Mar 21, 2020

NEON ecosystem seems to have some problems.

  1. neon new could not be complete in Windows -> neon new and build failed on Node11.10.1 Win10 neon-bindings/neon#406 (comment)
    • note: Maybe, it is not a critical problem at least for neon new -> neon new and build failed on Node11.10.1 Win10 neon-bindings/neon#406 (comment)
      • parse arguments in cli.ts -> call into cli_new.ts -> STDIN requests -> main process (mkdir and make files) -> flavor outputs (The problems is in the here) -> exit(0)
      • neon build --release is work expectedly in the directory that is breaked neon new process used CTRL+C
  2. npm i neon-hello could not be complete in Arch(WSL2) and Windows -> npm i neon-hello could not be complete in Arch(WSL2) and Windows ( maybe, the other platforms ) dherman/neon-hello#2

@usagi
Copy link
Owner Author

usagi commented Mar 21, 2020

Maybe, I'll give up to use NEON then I create a new marsharing automation system if NEON ecosystem is not expected for me. My target is not NEON ecosystem inclusion and commiting that is prepare a simple and practicable project for Rust backend with react-electron based frontend.


First, my motivation is not development for Electron frontend-ed project. It just the alternative choice for me. I want to use an ideal awesome frontend framework that is high Rust purity and nearly idel perfect GUI Toolkit ecosystems such as .NET Core/WPF/Prism or Qt/QML with common business GUI parts and GPU 3D context and good default look'n feels! But, the ideal solution is not available in the real world at least now. And I have motivation for development to backend systems but I have not for frontend subsytems. I have not so much a life times.

Ofcourse, I know WPF/Prism is not perfect that is messy for use. I know Qt or Gtk bidings is available on Rust ecosystem but these expensive pricing or GPL/LGPL infective. And conrod is really awesome GUI Toolkit but it has not enough for business GUI parts and so cheap default looks(conrod is focused to game development then it is not a problem. In commonly, game project creates own originally look'n feels). And I really expecting to druid and OrbTk but these are so youth that has no availability for global language supportings and many common features. Therefore, I choosen Electron frontend for real efficient just in now.

@usagi
Copy link
Owner Author

usagi commented Mar 21, 2020

https://github.com/dherman/neon-hello/network <- The original neon-hello

image

https://github.com/amilajack/neon-hello <- A mainteined fork

@usagi
Copy link
Owner Author

usagi commented Mar 21, 2020

💪 neon-bindings/website#124 💪

@usagi
Copy link
Owner Author

usagi commented Mar 21, 2020

Then, I restart the tutor: https://neon-bindings.com/docs/electron-apps

But, I got the next trouble with npm run build in https://neon-bindings.com/docs/electron-apps#thats-it section:

PS C:\Users\usagi\tmp\z\electron-quick-start> npm run build

> electron-quick-start@1.0.0 build C:\Users\usagi\tmp\z\electron-quick-start
> electron-build-env neon build neon-hello --release

neon ERR! spawn cargo ENOENT

Error: spawn cargo ENOENT
    at Process.ChildProcess._handle.onexit (internal/child_process.js:267:19)
    at onErrorNT (internal/child_process.js:469:16)
    at processTicksAndRejections (internal/process/task_queues.js:84:21)
electron-build-env error
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! electron-quick-start@1.0.0 build: `electron-build-env neon build neon-hello --release`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the electron-quick-start@1.0.0 build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\usagi\AppData\Roaming\npm-cache\_logs\2020-03-21T08_53_49_427Z-debug.log

Ah... @dherman's repos again. Maybe the repository has not been maintained for years. And, it will be no response if someone reporting the situation to Issues or pull-req. Sigh... I'm tired, what is the "basic".

@usagi
Copy link
Owner Author

usagi commented Mar 21, 2020

Perhaps even when integrating NEON into this repos, it is faster and easy to integrating myself originally method without a trial to the "basic" guide in NEON official docs and unmaintained related repos. Thus, I give up to use the "basic" guide and related repos works.

@usagi
Copy link
Owner Author

usagi commented Mar 21, 2020

Next step: I'll try to integrating NEON into this repos using my own method.

@usagi
Copy link
Owner Author

usagi commented Mar 21, 2020

💪 neon-bindings/neon#501 💪

@usagi
Copy link
Owner Author

usagi commented Mar 22, 2020

I'm studying NEON now. I want to fuse NEON into this template project but I don't want to lost cdylib level architective independency. Please wait more a hours or a few days, I know some experts has a good tips maybe but I need more a few internal knowledge of NEON.

@usagi usagi changed the title Fork a NEON included derived template project Fuse NEON technology => https://neon-bindings.com/ Mar 22, 2020
@usagi
Copy link
Owner Author

usagi commented Mar 22, 2020

Maybe, these examples is helpful for this issue:

@usagi
Copy link
Owner Author

usagi commented Mar 30, 2020

Note: In now, this issue is staking. I was integrated neon experimentaly but it was not work. The Node.js runtime throw the exception from reuiqre('../native/index.node') that said Error: Module did not self-register.. JS is really .... sigh.

@usagi
Copy link
Owner Author

usagi commented Mar 30, 2020

@usagi
Copy link
Owner Author

usagi commented Mar 30, 2020

note: neon-bindings/neon-cli#36

@usagi
Copy link
Owner Author

usagi commented Mar 30, 2020

note: electron/electron#18397

@usagi
Copy link
Owner Author

usagi commented Mar 30, 2020

note: electron/electron#21287

@usagi
Copy link
Owner Author

usagi commented Mar 30, 2020

I got it.

image

I'll itegrate NEON to this template soon, maybe.

@usagi
Copy link
Owner Author

usagi commented Mar 30, 2020

NEON vs. node-ffi-napi -> https://github.com/usagi/neon-vs-node-ffi-napi#a-result

@usagi
Copy link
Owner Author

usagi commented Mar 31, 2020

NEON integrated version works fine:

image

and refactoring scripts in package.json:

image

👍✨

@usagi
Copy link
Owner Author

usagi commented Mar 31, 2020

Plan:

  1. Push the NEON version to experimental branch
  2. Test cargo generate with the experimental branch
  3. Branch the node-ffi-napi version to the node-ffi-napi branch based the master branch
  4. Test cargo generate with the node-ffi-napi branch
  5. Merge the experimental branch to the master branch
  6. Test cargo generate with the master branch

@usagi
Copy link
Owner Author

usagi commented Mar 31, 2020

The NEON version works well in the experimental branch now. ✨

image

👍

@usagi
Copy link
Owner Author

usagi commented Mar 31, 2020

Well, done! #5

@usagi usagi closed this as completed Mar 31, 2020
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

1 participant