Skip to content
This repository has been archived by the owner on Jun 13, 2024. It is now read-only.

Fix some small typos #267

Merged
merged 1 commit into from
Oct 29, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions benchmark/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ We got this report on environment below:

| Name | Value |
|-------------------|---------------------------------------------------------------------------------------|
|**Processor** |Intel(R) Xeon(R) CPU L5640 @ 2.27GHz, 8 virtual procesors |
|**Processor** |Intel(R) Xeon(R) CPU L5640 @ 2.27GHz, 8 virtual processors |
|**System Type** |x64-based PC |
|**Physical Memory**|16.0 GB |
|**OS version** |Microsoft Windows Server 2012 R2 |
Expand Down Expand Up @@ -90,7 +90,7 @@ Average overhead is around 0.06ms to 0.12ms for `zone.execute`.
## Transport overhead

The overhead of `transport.marshall` includes
1. overhead of needing replacer callback during JSON.stringify. (even empty callback will slowdown JSON.stringfiy significantly)
1. overhead of needing replacer callback during JSON.stringify. (even an empty callback will slow down JSON.stringify significantly)
2. traverse every value during JSON.stringify, to check value type and get `cid` to put into payload.
- a. If value doesn't need special care.
- b. If value is a transportable object that needs special care.
Expand Down
2 changes: 1 addition & 1 deletion docs/api/module.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Napa.js follows [Node.js' convention](https://nodejs.org/api/modules.html) to su
4) API of creating C++ modules (addons) are similar. Napa.JS introduced macros that the same source code can be compiled to produce both Napa.js addon and Node.js addon.

But there are also differences:
1) C++ module that is designed/implemented for Napa.js can run on Node.JS (need different compile flags to produce '.napa' and '.node'). But not vice versal.
1) C++ module that is designed/implemented for Napa.js can run on Node.JS (need different compile flags to produce '.napa' and '.node'). But not vice versa.
2) Napa.js doesn't support all Node.js API. Node API are supported [incrementally](./node-api.md) on the motivation of adding Node.js built-ins and core modules that are needed for computation heavy tasks. You can access full capabilities of Node exposed via [Node zone](./zone.md#node-zone).
3) Napa.js doesn't provide `uv` functionalities, thus built-ins and core modules have its own implementation. To write async function in addon, methods `DoAsyncWork`/`PostAsyncWork` are introduced to work for both Napa.js and Node.js.
4) Napa.js supports embed mode. C++ modules need separate compilation between Node mode and embed mode.
Expand Down
2 changes: 1 addition & 1 deletion docs/api/store.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Though very convenient, it's not recommended to use store to pass values within
Following APIs are exposed to create, get and operate upon stores.

### <a name="create"></a> create(id: string): Store
It creates a store by a string identifer that can be used to get the store later. When all references to the store from all JavaScript VMs are cleared, the store will be destroyed. Thus always keep a reference at global or module scope is usually a good practice using `Store`. Error will be thrown if the id already exists.
It creates a store by a string identifier that can be used to get the store later. When all references to the store from all JavaScript VMs are cleared, the store will be destroyed. Thus always keep a reference at global or module scope is usually a good practice using `Store`. Error will be thrown if the id already exists.

Example:
```js
Expand Down
2 changes: 1 addition & 1 deletion examples/modules/plus-number/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ var obj = addon.createPlusNumber();

## Wrapped class

*plus-number.h* declares ths class with one constructor and one method, *Add()*.
*plus-number.h* declares the class with one constructor and one method, *Add()*.

```h
namespace napa {
Expand Down
8 changes: 4 additions & 4 deletions examples/tutorial/napa-runner/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
Napa runner is an example to embed Napa.JS into a C++ program. It simply runs JavaScript with all Napa capability without Node dependency from command line.

## How to build
1. Go to napajs root directory, run "node build.js embed" to build napa library for embeded mode.
1. Go to napajs root directory, run "node build.js embed" to build napa library for embedded mode.

**NOTE**: This step may take about 30 mins, because it will build V8 libray from Node. We are using node v6.10.3, a stable version can build as a library. It is specified in [embedded.js](https://github.com/Microsoft/napajs/blob/master/scripts/embedded.js) and [napa-runner CMakeLists.txt](https://github.com/Microsoft/napajs/blob/master/examples/tutorial/napa-runner/CMakeLists.txt). Please update both of them if you want to use a different version of Node/V8.
**NOTE**: This step may take about 30 mins, because it will build V8 library from Node. We are using node v6.10.3, a stable version can build as a library. It is specified in [embedded.js](https://github.com/Microsoft/napajs/blob/master/scripts/embedded.js) and [napa-runner CMakeLists.txt](https://github.com/Microsoft/napajs/blob/master/examples/tutorial/napa-runner/CMakeLists.txt). Please update both of them if you want to use a different version of Node/V8.

2. Go to directory of "examples/tutorial/napa-runner", and run "cmake-js build" to build napa runner

**NOTE**: Build solution of napa-runner is provided only for linux system so far. Windows / Mac OS support will come in near future.

## How to use
1. Run "npm install" to intall required npm modules
2. Run "./bin/napa-runner emstimate-PI.js"
1. Run "npm install" to install required npm modules
2. Run "./bin/napa-runner estimate-PI.js"

2 changes: 1 addition & 1 deletion scripts/embedded.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ exports.build = function (buildType) {
}
else {
// TODO (asib): support other platforms
console.log("\x1b[1m\x1b[32m", "Napa build solution for embeded mode is not provided for ", os.platform(),'\x1b[0m');
console.log("\x1b[1m\x1b[32m", "Napa build solution for embedded mode is not provided for ", os.platform(),'\x1b[0m');
return;
}

Expand Down