Skip to content

Conversation

@twitchard
Copy link
Collaborator

@twitchard twitchard commented Apr 23, 2025

  1. Stop using commands from Bun's standard library -- use the nodejs standard library instead.
  2. Don't use bun to compile a standalone binary. Instead, put #!/usr/bin/env node at the top of index.ts and ship an index.js with the bundled Javascript for the entire CLI.

Downside of this: bun's startup time is faster so now the CLI will boot up a little slower when the user types a command.
Upside of this: we are essentially opting out of handling platform cross-compatibility ourselves, all we now rely upon is the user having a supported node binary somewhere on their system (which is pretty likely if they installed us via npm install @humeai/cli)

Tested via
npm run prebuild && dist/index.js tts "Hello" on both Linux and Mac.

@zgreathouse zgreathouse self-requested a review April 23, 2025 19:52
@zgreathouse zgreathouse merged commit c9e28e4 into main Apr 23, 2025
1 check passed
@twitchard twitchard deleted the twitchard/better-cross-compat branch April 23, 2025 19:56
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

Successfully merging this pull request may close these issues.

3 participants