Git Product home page Git Product logo

Comments (5)

Danny-Dasilva avatar Danny-Dasilva commented on June 5, 2024 1

I tested the default package on a raspberry pi 3 and 4 running the latest Raspberry Pi OS version and the package appeared to work just fine by default.

Anything that is a derivative of the three supported platforms should in theory function including a mac arm chip.

For release 0.0.19 explicit support for linux arm and arm64 was added.

You can see how it was implemented here

CycleTLS/package.json

Lines 15 to 16 in 2a7fc20

"build:arm64": "cross-env GOOS=linux GOARCH=arm64 go build -o ./dist/index-arm64 ./golang && chmod +x ./dist/index-arm64",
"build:arm": "cross-env GOOS=linux GOARCH=arm go build -o ./dist/index-arm ./golang && chmod +x ./dist/index-arm",

CycleTLS/src/index.ts

Lines 122 to 128 in 2a7fc20

if (os.arch() == "arm") {
executableFilename = "index-arm";
} else if (os.arch() == "arm64") {
executableFilename = "index-arm64";
} else {
//default
executableFilename = "index";

If you are curious how to compile versions for a custom/niche operating system there is an added section in the README for it.

Cross Compiling for other platforms

Basically you can compile using Golang's cross compilation tools and manually run the compiled file. The package should connect on the default port 9112 to the spawned Golang server, no need to update the index.ts file, you just need to run the compiled executable.

e.g.

$ ./index

from cycletls.

Danny-Dasilva avatar Danny-Dasilva commented on June 5, 2024 1

Correct, ARM binaries are not included in the NPM package, they should function on ARM without the specific binaries though (at least the arm chips I tested, Cortex-A53 and Cortex-A35).

I can include them but then I need to build tests around them if they are supposed to be fully supported. Arm and Arm64 as well as other linux derivatives have complicated github actions implementations. If I can implement those I will include them in the npm package. Perhaps building a docker container would be preferred.

from cycletls.

White2001Offl avatar White2001Offl commented on June 5, 2024

You can do npm run build:mac which builds for your architecture. But you should have go installed

Same for npm run build:windows and npm run build:linux

from cycletls.

zebrapurring avatar zebrapurring commented on June 5, 2024

You can do npm run build:mac which builds for your architecture. But you should have go installed

Same for npm run build:windows and npm run build:linux

Unfortunately this is not possible when using the package as a NPM dependency, since the sources are missing.

Also building the tool from source currently does not work because of #84.

from cycletls.

zebrapurring avatar zebrapurring commented on June 5, 2024

Great! Thanks for the quick response.

So the ARM binaries are not included in the NPM package, right? Do you think it would make sense to include them as well?

from cycletls.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.