58.0.0 • Published 10 months ago

@howso/amalgam-lang v58.0.0

Weekly downloads
-
License
AGPL-3.0-only
Repository
github
Last release
10 months ago

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.

58.0.0

10 months ago

57.0.4

1 year ago

57.0.3

1 year ago

57.0.2

1 year ago

57.0.0

1 year ago

57.0.1

1 year ago

56.0.0

2 years ago

54.5.0

2 years ago

54.3.18

2 years ago

55.0.0

2 years ago

0.0.1

3 years ago