Wasmer’s WCGI pairs WebAssembly and CGI

Wasmer’s WCGI pairs WebAssembly and CGI

Pair, combine, two puzzle pieces that fit together
tadamichi/Shutterstock

Wasmer aims to “revolutionize” server-side web development with WCGI, a technology that combines the WebAssembly binary instruction format with CGI (Common Gateway Interface). Positioned for serverless computing or running apps at the edge, WCGI promises to allow developers to reuse existing CGI applications by compiling them to WebAssembly/WASI (WebAssembly System Interface).

Wasmer says that WCGI “marries the power of WebAssembly with the versatility and simplicity of CGI.” Introduced April 6, WCGI is intended to present a refined approach to server-side development, leveraging the flexibility, security, and performance of WebAssembly. Developers can ship small packages that only contain business logic and static assets, with no HTTP stack or Docker containers needed. And, thanks to WebAssembly, WCGI enables sandboxed execution, with one isolated request per instance.

Wasmer, which provides a server-side runtime for WebAssembly, cited multiple reasons it believes that WCGI is beneficial for running serverless or edge apps:

  • Websites have been using CGI for decades; WCGI provides a path for deploying in a serverless context.
  • There is no need to pay for an always-on server.
  • WebAssembly apps are considerably easier to distribute than Docker images.
  • Having one process per request is infinitely scalable and allows isolation between requests.
  • Running code inside a WebAssembly VM allows isolation from the underlying OS.
  • Developers can start a new WebAssembly instance in a fraction of a millisecond.

Instructions for creating a WCGI app with Rust or PHP can be found at wasmer.io. Source code for a WCGI template for PHP can be found on GitHub.

Copyright © 2023 IDG Communications, Inc.

How to choose a low-code development platform
<!-- var slotName = 'bottomleaderboard'; var slotSize = []; if ($thm.deviceClass == 'mobile') { slotSize = [[300,50],[320,50],[300,250]]; } else if ($thm.deviceClass == 'tablet') { slotSize = [[728,90],[468,60]]; } else { slotSize = [[728,90],[970,90],[970,250]]; } IDG.GPT.addDisplayedAd(slotName, "true"); document.write('

'); IDG.GPT.defineGoogleTagSlot(slotName, slotSize, false, true); document.write('

'); $('#' + slotName).responsiveAd({screenSize:'971 1115', scriptTags: []}, true); //-->

Add a Comment