Security News
New Python Packaging Proposal Aims to Solve Phantom Dependency Problem with SBOMs
PEP 770 proposes adding SBOM support to Python packages to improve transparency and catch hidden non-Python dependencies that security tools often miss.
@assemblyscript/wasi-shim
Advanced tools
Patches the AssemblyScript compiler to utilize WASI imports instead of Web APIs.
Patches the AssemblyScript compiler to utilize WASI imports instead of Web APIs.
Note that this shim also serves a higher purpose, that is as an example of how to target any non-standard interface with the AssemblyScript compiler, including your own!
See the assembly folder for the concrete implementations.
Component | Functionality |
---|---|
console | assert, log, debug, info, warn, error, time, timeEnd |
crypto | getRandomValues |
date | now |
internal | abort, trace, seed |
performance | now |
process | arch, platform, argv, env, exitCode, stdin¹, stdout¹, stderr¹, hrtime |
¹ Limited/basic support
First, install the WASI shim alongside the AssemblyScript compiler:
npm install --save-dev @assemblyscript/wasi-shim
Afterwards, reference the provided configuration file in your builds.
Option 1: Command line
When invoking asc
manually, add --config ./node_modules/@assemblyscript/wasi-shim/asconfig.json
as a command line option.
Option 2: Config file
When using an asconfig.json
for your project, extend the provided configuration file instead:
{
"extends": "./node_modules/@assemblyscript/wasi-shim/asconfig.json",
// ...
}
That's it. The AssemblyScript compiler now emits WASI-compatible modules. No more Web APIs!
Using this shim offers almost identical functionality to the former WASI support that was included with the AssemblyScript compiler up to version 0.20. The differences are:
import "wasi"
mechanism is no longer necessary and hence no longer supported.--exportStart _initialize
. See the WASI documentation for differences.Since version 0.21, AssemblyScript considers WASI, derived proposals, the W3C's endorsement of its subgroup and the Bytecode Alliance's practices, that not all of their respective members necessarily are aware and/or approve of, harmful to open standards in general and the WebAssembly specification in particular.
The AssemblyScript project neither endorses nor officially supports any particular custom interface suitable to undermine purpose, goals and/or values of open Web standards. This package is nonetheless provided to our community for those who, given the subsequently established market situation, have no other choice than to use such interfaces or derived products. Regardless of the existence of this package, we explicitly welcome healthy competition in the rich design space of modern host interfaces. Specifically, we'd love to see (and use) a truly open host interface that keeps the Web in mind, i.e. adheres to WebAssembly's goals, while being portable, secure and efficient for many programming languages — including those that are a natural fit for the Web platform.
FAQs
Patches the AssemblyScript compiler to utilize WASI imports instead of Web APIs.
The npm package @assemblyscript/wasi-shim receives a total of 421 weekly downloads. As such, @assemblyscript/wasi-shim popularity was classified as not popular.
We found that @assemblyscript/wasi-shim demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
PEP 770 proposes adding SBOM support to Python packages to improve transparency and catch hidden non-Python dependencies that security tools often miss.
Security News
Socket CEO Feross Aboukhadijeh discusses open source security challenges, including zero-day attacks and supply chain risks, on the Cyber Security Council podcast.
Security News
Research
Socket researchers uncover how threat actors weaponize Out-of-Band Application Security Testing (OAST) techniques across the npm, PyPI, and RubyGems ecosystems to exfiltrate sensitive data.