Socket
Book a DemoInstallSign in
Socket

@howso/amalgam-lang

Package Overview
Dependencies
Maintainers
3
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@howso/amalgam-lang

Provides a package around [@howso/amalgam](https://github.com/howsoai/amalgam) releases.

58.0.0
latest
Source
npmnpm
Version published
Weekly downloads
1
Maintainers
3
Weekly downloads
 
Created
Source

Introduction

Provides a package around @howso/amalgam releases.

Amalgam version: 63.0.0

Usage

npm i @howso/amalgam-lang
npm i --save-dev @types/emscripten

We highly suggest the use of a Worker. Create one that can be handed to @howso/engine.

@/workers/AmalgamWorker:

import { AmalgamWasmService, initRuntime } from "@howso/amalgam-lang";
import wasmDataUri from "@howso/amalgam-lang/lib/amalgam-st.data?url";
import wasmUri from "@howso/amalgam-lang/lib/amalgam-st.wasm?url";

(async function () {
  const svc = new AmalgamWasmService((options) => {
    return initRuntime(
      options,
      {
        locateFile: (path: string) => {
          // Override file paths so we can use hashed version in build
          if (path.endsWith("amalgam-st.wasm")) {
            return wasmUri;
          } else if (path.endsWith("amalgam-st.data")) {
            return wasmDataUri;
          }
          return self.location.href + path;
        },
      },
      { logger: console },
    );
  });
  self.onmessage = async (ev) => {
    svc.dispatch(ev);
  };
  self.postMessage({ type: "event", event: "ready" });
})();

Development

Syncing with new Amalgam releases

Anytime a new release is created in @howso/amalgam package's amalgam-st.wasm, update the entire src/webassembly directory's contents.

Update the interfaces

In most releases the Amalgam language's interfaces will not change. When it does, update the other files.

Publishing

Actions are available through GitHub.

FAQs

Package last updated on 09 Jun 2025

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.