mscdex / ssh2

SSH2 client and server modules written in pure JavaScript for node.js
MIT License
5.51k stars 663 forks source link

Please clarify in what cases a C++ compiler is required. #1333

Closed beppyd closed 2 months ago

beppyd commented 1 year ago

It was said that All binary addons used by this module are completely optional in #1310. I want you to describe in the document when an optional module is needed.

When this is installed as node modules, there is no error even if the environment does not compile. Please clarify in what cases a C++ compiler is required. Then we, as users, can use it with peace of mind.

In particular, please mention not only cpu-features but also binding.cc in document.

mscdex commented 1 year ago

I'm not sure exactly what you're asking, the optional modules aren't needed because they're well.... optional. If you're asking about their purposes, then cpu-features is used to optimize the default order of crypto algorithms and the built-in binding is used to both optimize encryption/decryption and to provide native poly1305 support (which node core currently does not expose).

beppyd commented 1 year ago

Thanks for the reply. I understood. Could you please include what you said in the readme?

cpu-features is used to optimize the default order of crypto algorithms. the built-in binding is used to both optimize encryption/decryption and to provide native poly1305 support (which node core currently does not expose).

This is because the current documentation, even though there is mention of the existence of optional modules, does not mention what the benefits are if the optional modules are built.

foxt commented 9 months ago

This is because the current documentation, even though there is mention of the existence of optional modules, does not mention what the benefits are if the optional modules are built.

From the README.md:

(Optional) cpu-features is set as an optional package dependency (you do not need to install it explicitly/separately from ssh2) that will be automatically built and used if possible. See the project's documentation for its own requirements. This addon is currently used to help generate an optimal default cipher list