Skip to main content
Home

Built and signed on GitHub Actions

This library provides the code generators for producing waPC modules using the Apex language (https://apexlang.io).

This package works with Node.js, DenoIt is unknown whether this package works with Cloudflare Workers, Bun, Browsers
It is unknown whether this package works with Cloudflare Workers
This package works with Node.js
This package works with Deno
It is unknown whether this package works with Bun
It is unknown whether this package works with Browsers
JSR Score
76%
Published
5 months ago (0.1.1)

waPC Code Generators

This library provides the code generators for producing waPC modules using the Apex language.

Installation

Make sure you have the Apex CLI installed. Here are the instructions.

From your terminal, run:

apex install jsr:@wapc/codegen/templates
INFO Installing @wapc/assemblyscript...
INFO Installing @wapc/rust...
INFO Installing @wapc/tinygo...

Now you should see waPC project templates available.

apex list templates
┌──────────────────────┬────────────────────────────────────┐
│ Name                 │ Description                        │
└──────────────────────┴────────────────────────────────────┘
  @wapc/assemblyscript   AssemblyScript waPC module project
  @wapc/rust             TinyGo waPC module project
  @wapc/tinygo           TinyGo waPC module project

To create a new TinyGo waPC module, run:

apex new @wapc/tinygo hello-world
cd hello-world
apex all
ls -l build
-rwxr-xr-x  1 uname  staff  18454 Sep 19 14:56 hello-world.wasm

If you load the project in VS Code (code . from the terminal if VS code is in your path), a task will monitor the Apex interface definition for changes and regenerate boilerplate code.

Built and signed on
GitHub Actions

New Ticket: Report package

Please provide a reason for reporting this package. We will review your report and take appropriate action.

Please review the JSR usage policy before submitting a report.

Add Package

deno add jsr:@wapc/codegen

Import symbol

import * as codegen from "@wapc/codegen";
or

Import directly with a jsr specifier

import * as codegen from "jsr:@wapc/codegen";

Add Package

pnpm i jsr:@wapc/codegen
or (using pnpm 10.8 or older)
pnpm dlx jsr add @wapc/codegen

Import symbol

import * as codegen from "@wapc/codegen";

Add Package

yarn add jsr:@wapc/codegen
or (using Yarn 4.8 or older)
yarn dlx jsr add @wapc/codegen

Import symbol

import * as codegen from "@wapc/codegen";

Add Package

vlt install jsr:@wapc/codegen

Import symbol

import * as codegen from "@wapc/codegen";

Add Package

npx jsr add @wapc/codegen

Import symbol

import * as codegen from "@wapc/codegen";

Add Package

bunx jsr add @wapc/codegen

Import symbol

import * as codegen from "@wapc/codegen";