Security News
cURL Project and Go Security Teams Reject CVSS as Broken
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.
walt-compiler
Advanced tools
This is the main walt compiler package.
npm install --save walt-compiler
import compileWalt, { debug as printWasm } from 'walt-compiler';
const buffer = compileWalt(`
export function count(): i32 {
counter += 1;
return counter;
}
`);
WebAssembly.instantiate(buffer).then(module => {
console.log(`Counter export: ${module.instance.exports.count()}`);
});
Main parse step of the compiler. Returns a bare bones Abstract Syntax Tree without type information. This tree cannot be directly compiled without semantic analysis, but can be transformed easily.
import { parse } from 'walt-compiler';
const ast = parse(`
type MyObjectType = { 'foo': i32, 'bar': f32 };
export function test(): f32 {
const obj: MyObjectType = 0;
obj['foo'] = 2;
obj['bar'] = 2.0;
return obj['foo'] + obj['bar'];
}
`);
console.log(ast); // { value: 'ROOT_NODE', Type: 'Program', range: [...], params: [...] .... }
Provides a human readable output of the AST nodes. Returns a string, does not log to console.
Semantic Analyzer, takes a bare AST and returns a transformed version of the AST with semantics applied(type indexes etc.,).
Intermediate code generator, takes an AST and returns a Program object.
Binary emitter, takes a Program and returns an OutputStream object. OutputStream.buffer()
generates a "real" binary buffer.
Used for debugging the buffer returned by emitter. Returns a string representation of the binary program.
FAQs
Alternative syntax for WebAssembly text format
The npm package walt-compiler receives a total of 49 weekly downloads. As such, walt-compiler popularity was classified as not popular.
We found that walt-compiler demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.
Security News
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.
Security News
Biden's executive order pushes for AI-driven cybersecurity, software supply chain transparency, and stronger protections for federal and open source systems.