Skip to content
This repository has been archived by the owner on Jul 18, 2022. It is now read-only.

Update to support Go 1.16, and Node 14 (LTS) #2

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

MrSaints
Copy link
Owner

  • Switch JS dependencies to ffi-napi, ref-napi, and ref-struct-di,
    as the previous dependencies are no longer maintained, and they do
    not support Node 14.
  • Re-build shared library using Go 1.16.4.
  • Set GODEBUG=cgocheck=0 when running go-node-ffi.js to get around
    "cgo result has Go pointer" / "Go pointer stored into non-Go memory".
    This may very well be a legitimate error / check, and if so, it is
    caused by using, and returning fmt.Sprintf. This requires further
    investigation.

- Switch JS dependencies to `ffi-napi`, `ref-napi`, and `ref-struct-di`,
  as the previous dependencies are no longer maintained, and they do
  not support Node 14.
- Re-build shared library using Go 1.16.4.
- Set `GODEBUG=cgocheck=0` when running `go-node-ffi.js` to get around
  "cgo result has Go pointer" / "Go pointer stored into non-Go memory".
  This may very well be a legitimate error / check, and if so, it is
  caused by using, and returning `fmt.Sprintf`. This requires further
  investigation.
@MrSaints
Copy link
Owner Author

So reading the docs again, really, we shouldn't be returning GoString. This does add a bit of complexity as the caller will have to free the string right after use.

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

Successfully merging this pull request may close these issues.

1 participant