Skip to content

Integrate a Node native module like utp-native or leveljs in order to demonstrate vercel/pkg #27

@CMCDragonkai

Description

@CMCDragonkai

The vercel/pkg has successfully been implemented and is now producing pre-release packages in our release page.

However we have yet to test how it works when dealing with native modules like utp-native.

We need to add in utp-native and leveljs as demonstrations of building a CLI executable with native code.

This will be essential for js-polykey to be capable of producing release executables.

  1. Integrate leveldb into TypeScript-Demo-Lib
  2. Integrate utp-native into TypeScript-Demo-Lib
  3. Perform a hello world equivalent of using these 2 libraries, for leveldb that's CRUD on the database, for utp-native we would need to start a server, and close the server.
  4. Then use vercel/pkg to package up the program
  5. Sanity check the release
  6. Fix up any native module configuration required for vercel/pkg

Checklist:

  • I've done some reading on native modules and vercel/pkg.
  • cloned the TypeScript-Demo-Lib, built and ran it to see it working.
  • built TypeScript-Demo-Lib with pkg and ran it in linux to check it is working.
  • Written a hello world test for level.
  • written a hello world test for utp-native.
  • pkg with level and test it works.
  • pkg with utp-native and test it works.
  • create a test for worker threads.
  • pkg with worker threads and test it works

Relevant upstream PR vercel/pkg#1273

Metadata

Metadata

Assignees

Labels

developmentStandard developmentopsOperations and administration

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions