0.0.29 • Published 2 years ago

idena-sdk-bindgen v0.0.29

Weekly downloads
-
License
(MIT AND Apache-2...
Repository
github
Last release
2 years ago

Near Bindings Generator

Transforms the Assembyscript AST to serialize exported functions and add encode and decode functions for generating and parsing JSON strings.

Using via CLI

After installling, npm install nearprotocol/near-bindgen-as, it can be added to the cli arguments of the assemblyscript compiler you must add the following:

asc <file> --transform near-bindgen-as ...

This module also adds a binary near-asc which adds the default arguments required to build near contracts as well as the transformer.

near-asc <input file> <output file>

Using a script to compile

Another way is to add a file such as asconfig.js such as:

const compile = require("near-bindgen-as/compiler").compile;


compile("assembly/index.ts", // input file
        "out/index.wasm",    // output file
        [
        //   "-O1",            // Optional arguments
        "--debug",
        "--measure"
        ],
        // Prints out the final cli arguments passed to compiler.
        {verbose: true}
        );

It can then be built with node asconfig.js. There is an example of this in the test directory.

0.0.27

2 years ago

0.0.28

2 years ago

0.0.29

2 years ago

0.0.21

2 years ago

0.0.22

2 years ago

0.0.23

2 years ago

0.0.24

2 years ago

0.0.25

2 years ago

0.0.26

2 years ago

0.0.20

2 years ago

0.0.19

2 years ago

0.0.18

2 years ago

0.0.17

2 years ago

0.0.16

2 years ago

0.0.15

2 years ago

0.0.14

2 years ago

0.0.13

2 years ago

0.0.10

2 years ago

0.0.9

2 years ago

0.0.6

2 years ago

0.0.5

2 years ago

0.0.4

2 years ago

0.0.3

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago