Skip to content

A JS/Wasm package for generating Candid bindings.

Notifications You must be signed in to change notification settings

neptune0xf/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

Languages

  • JavaScript 83.9%
  • Rust 16.1%