You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I love the functionality of nex and would like to extend the V8 services to 'wrap' our own libraries. I can do this by editing v8.go (I almost raised an issue to suggest providing an abstraction to allow devs to add functions to the v8 layer, but guess that's beyond the scope of nex). However, the current build restricts v8 compilation to linux/amd64, so we're unable to develop lambda-style functions on Mac M-series or Arm machines without running something like Ubuntu emulations.
The lambda-style functions are extremely exciting to us - even more so if we can get it on different architectures.
Use case
V8 function development and deployment on NATS/Nex for Mac M-Series and Arm devices.
Contribution
Potentially looking at this - but not. yet. If you already have something in the pipeline, then I'd prefer to go with the official build.
The text was updated successfully, but these errors were encountered:
The limitation on V8 execution is coming from the V8 library itself. It will only work in a small set of targets. We've been checking into the possibility of providing a more broadly supported JavaScript runtime. Until then, plugins are a workaround.
We now have pluggable workload execution providers, so one could be written that uses a different JavaScript hosting engine than what we're using now.
Thanks for the reply - I get where you're coming from. The pluggable execution providers will definitely help.
Having had a delve, I managed to get everything compiling in a dev container on the Mac - the trick being to build the environment using a docker file with platform: linux/amd64 - that lets me build and run (in no_sandbox mode). With that I could then edit the v8.go to put an extra global object after the hostServices... you add. That brought our custom functions into the V8 environment without issue - the only downside being that I had to edit your v8.go to do it.
Overall, it's got to a good place ... with just a little inconvenience / hackery around extensions for V8. I appreciate it's a bit of a V8 vs Nex thing, but it is relatively easy to do. For the Arm and Mac executables, I think we might end up resorting to something like github.com/robertkrimen/otto just for the ease of adding functions in go natively.
Proposed change
I love the functionality of nex and would like to extend the V8 services to 'wrap' our own libraries. I can do this by editing v8.go (I almost raised an issue to suggest providing an abstraction to allow devs to add functions to the v8 layer, but guess that's beyond the scope of nex). However, the current build restricts v8 compilation to linux/amd64, so we're unable to develop lambda-style functions on Mac M-series or Arm machines without running something like Ubuntu emulations.
The lambda-style functions are extremely exciting to us - even more so if we can get it on different architectures.
Use case
V8 function development and deployment on NATS/Nex for Mac M-Series and Arm devices.
Contribution
Potentially looking at this - but not. yet. If you already have something in the pipeline, then I'd prefer to go with the official build.
The text was updated successfully, but these errors were encountered: