echo package icon
robert/echo

wasi

Public
wasmer run robert/echo

echo

A very basic echo (doesn't support coreutils echo parameters except -n):

#include <stdio.h>
#include <string.h>

#define true 1
#define false 0

int main(int argc, char *argv[])
{
  int display_return = true;

  for(int i = 1; i < argc; i++)
  {
    // Parse arguments:
    //   -n = don't output trailing newline
    if(strcmp("-n", argv[i]) == 0) {
      display_return = false;
      continue;
    }

    // Output arg if not a parameter
    printf("%s", argv[i]);
    if(i < (argc - 1))
      printf(" ");
  }

  // Show trailing newline
  if(display_return == true)
    printf("\n");
}

To run:

$ wasmer run -- echo.wasm -n this is a test  # notice the "--"

A very basic echo

More packages
An example echo server built for Waxosuit
Kevin Hoffman
Kevin Hoffman
Kevin Hoffman
Kevin Hoffman
Javascript echo server using winter-js.
test echo program
Stas Kelvich
Stas Kelvich
Stas Kelvich
Stas Kelvich
test echo program
Stas Kelvich
Stas Kelvich
Stas Kelvich
Stas Kelvich
A simple HTTP echo server using WinterJS - responds with request information.
A simple echo server implemented with WAGI
Christoph Herzog
Christoph Herzog
Christoph Herzog
Christoph Herzog
WCGI server that responds with information about the request.

Making software universally accessible