Use CC++ code in DENO using WASM: In VSCODE, using WASI SDK

This page summarizes the projects mentioned and recommended in the original post on dev.to

InfluxDB - Power Real-Time Data Analytics at Scale
Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
www.influxdata.com
featured
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com
featured
  • wasi-sdk

    WASI-enabled WebAssembly C/C++ toolchain

  • WASI SDK Download the latest tar.gz file and extract to directory of your choice, we will call it WASI_SDK_HOME.

  • #include #include #include #include #include #include #include int main(int argc, char **argv) { ssize_t n, m; char buf[BUFSIZ]; if (argc != 3) { fprintf(stderr, "usage: %s \n", argv[0]); exit(1); } int in = open(argv[1], O_RDONLY); if (in < 0) { fprintf(stderr, "error opening input %s: %s\n", arhttps://github.com/anuragvohraec/EXAMPLE_WASI_CPP_DENOhttps://github.com/anuragvohraec/EXAMPLE_WASI_CPP_DENOgv[1], strerror(errno)); exit(1); } int out = open(argv[2], O_WRONLY | O_CREAT, 0660); if (out < 0) { fprintf(stderr, "error opening output %s: %s\n", argv[2], strerror(errno)); exit(1); } while ((n = read(in, buf, BUFSIZ)) > 0) { char *ptr = buf; while (n > 0) { m = write(out, ptr, (size_t)n); if (m < 0) { fprintf(stderr, "write error: %s\n", strerror(errno)); exit(1); } n -= m; ptr += m; } } if (n < 0) { fprintf(stderr, "read error: %s\n", strerror(errno)); exit(1); } std::cout << "Done" << std::endl; return EXIT_SUCCESS; }

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

    InfluxDB logo
  • #include #include #include #include #include #include #include int main(int argc, char **argv) { ssize_t n, m; char buf[BUFSIZ]; if (argc != 3) { fprintf(stderr, "usage: %s \n", argv[0]); exit(1); } int in = open(argv[1], O_RDONLY); if (in < 0) { fprintf(stderr, "error opening input %s: %s\n", arhttps://github.com/anuragvohraec/EXAMPLE_WASI_CPP_DENOhttps://github.com/anuragvohraec/EXAMPLE_WASI_CPP_DENOgv[1], strerror(errno)); exit(1); } int out = open(argv[2], O_WRONLY | O_CREAT, 0660); if (out < 0) { fprintf(stderr, "error opening output %s: %s\n", argv[2], strerror(errno)); exit(1); } while ((n = read(in, buf, BUFSIZ)) > 0) { char *ptr = buf; while (n > 0) { m = write(out, ptr, (size_t)n); if (m < 0) { fprintf(stderr, "write error: %s\n", strerror(errno)); exit(1); } n -= m; ptr += m; } } if (n < 0) { fprintf(stderr, "read error: %s\n", strerror(errno)); exit(1); } std::cout << "Done" << std::endl; return EXIT_SUCCESS; }

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts

  • Stop Hiding the Sharp Knives: The WebAssembly Linux Interface

    4 projects | news.ycombinator.com | 13 Dec 2023
  • WASI: WebAssembly System Interface

    6 projects | news.ycombinator.com | 5 Aug 2023
  • A First Look at Wasm and Docker

    2 projects | dev.to | 6 Nov 2022
  • whats all the fuzz about wasi-libc?

    3 projects | /r/Gentoo | 17 Jun 2022
  • WebAssembly and Back Again: Fine-Grained Sandboxing in Firefox 95

    7 projects | news.ycombinator.com | 6 Dec 2021