tree: e109ad12387369fcecfff6e18cb70a1a7701f563 [path history] [tgz]
  1. bin/
  2. echosshd/
  3. third_party/
  4. wassh-libc-sup/
  5. .gitignore
  6. build.sh
  7. LICENSE
  8. README.md
ssh_client/README.md

OpenSSH WASM port

This is the port of OpenSSH to WASM+WASI (which is then integrated into nassh).

Most people who want to hack on the Secure Shell app do not need to make changes here. Typically this will be built once and copied into the nassh tree. If you don't have binaries already, run ./nassh/bin/plugin to install recent versions.

Contact

The chromium-hterm mailing list can be used to contact other users and developers for questions.

Building

Development Tools

You'll need some extra packages to compile. Adjust these for your distro.

$ sudo apt-get install \
    gcc g++ libstdc++6:i386 libglib2.0-0:i386 git make cmake lbzip2 \
    python-is-python3 python3 pylint3 python3-requests \
    curl zlib1g-dev zip unzip rsync pkg-config xz-utils patch

Build Script

To compile, you just have to run ./build.sh. It should take care of downloading the SDK and building all the required dependencies.

When it's finished, the output/ directory will hold all the compiled objects, and the output/plugin/ directory can be copied over to nassh.

OpenSSH Upstream Git

The openssh-git package allows for quickly testing upstream OpenSSH git.

# Initialize all the projects.
$ ./build.sh

# Clone upstream git & build it.
$ ./third_party/openssh-git/build

# Copy it for local testing.
$ cp output/build/wasm32-wasip1/openssh-git/work/openssh-git/ssh \
  ../nassh/plugin/wasm/ssh.wasm

# Make changes and rebuild quickly.
$ cd output/build/wasm32-wasip1/openssh-git/work/openssh-git/
<make changes>
$ make ssh

Source Layout

If you're hacking on the source, here are the files you most likely care about:

  • bin/: Tools for building/testing ssh_client.
    • [lint]: Helper tool for linting various code.
    • ssh_client.py: Utility library for Python build code.
  • build.sh: The main compile script. Takes care of downloading & compiling OpenSSH, and any other software. Run it and forget!
  • output/: All download & compiled objects are saved here.
    • bin/: Various helper tools used at build time.
    • build/: All subprojects get an individual build directory under an ABI specific directory.
      • build/: Projects needed to build other projects (e.g. toolchains).
      • wasm32-wasip1/: Projects compiled for WASM using the WASI ABI.
      • wasm32-wasip1-threads/: Projects compiled for WASM using the WASI ABI with threading enabled.
    • distfiles/: All downloaded archives are cached here.
    • home/: Scratch dir used as $HOME when building projects.
    • plugin/: The final output of the build process for nassh.
    • wasi-sdk/: The WASI SDK which contains the toolchain and all headers & libs for building WASM programs.
  • third_party/: All third party projects have a unique subdir. You can run their build script directly to compile them, but dependencies are not checked. Use build.sh to handle ordering.
    • ldns/: DNS library supporting DNSSEC and such.
    • mandoc/: Tools to generate html from man pages.
    • openssh-*/: Code to download & build OpenSSH.
    • openssl/: Code to download & build OpenSSL (the crypto lib).
    • zlib/: Standard compression library.
  • wassh-libc-sup/: Supplemental WASI C library code.

References

Here's a random list of documents which would be useful to people.