Skip to content
This repository has been archived by the owner on Sep 8, 2023. It is now read-only.
/ didc-js Public archive

A JS/Wasm package for generating Candid bindings.

Notifications You must be signed in to change notification settings

ic-rocks/didc-js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

didc-js

A JS/Wasm package for generating Candid bindings.

Building

cargo install wasm-pack
wasm-pack build --target bundler
wasm-opt --strip-debug -Oz pkg/didc_bg.wasm -o pkg/didc_bg.wasm

Usage

const didc = import("pkg/didc_js");

didc.then((mod) => {
  const service = `service : {
    add : (int32, int32) -> (int32) query;
  }`;
  const bindings = mod.generate(service); // Bindings { js: "...", ts: "...", motoko: "..." }
});

About

A JS/Wasm package for generating Candid bindings.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published