ceifa / tiktoken-node

OpenAI's tiktoken but with node bindings
103 stars 10 forks source link

Cross-compile rust binaries #14

Closed noseworthy closed 1 year ago

noseworthy commented 1 year ago

We need to compile binaries for multiple platforms. Previously we were doing this by running the build on multiple github runners. Unfortunately github doesn't provide all the platforms we need to build, namely arm64 platforms.

Follow the example from https://github.com/napi-rs/cross-build on how to cross-compile rust binaries using napi-rs to build binaries for windows, mac, and linux for x86 and arm architectures.

ceifa commented 1 year ago

Wow, this is beautiful! Will take a look at that when get home.

noseworthy commented 1 year ago

Wow, this is beautiful! Will take a look at that when get home.

Thanks! Happy to help (and get my questionable binary out of the repo hahaha) 😄