Skip to content

Documentation update #1573

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
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
35 changes: 33 additions & 2 deletions docs/01.GETTING-STARTED.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,10 @@ python tools/build.py --debug --lto=off
python tools/build.py --cmake-param=CMAKE_PARAM
```

**Set a profile mode (full, minimal)**
**Set a profile mode (ES5.1, subset of ES2015, minimal)**

```bash
python tools/build.py --feature=full|minimal
python tools/build.py --profile=es5.1|es2015-subset|minimal
```

**Use (jerry, compiler-default, external) libc**
Expand Down Expand Up @@ -81,6 +81,37 @@ For example the cross-compile to RaspberryPi 2 is something like this:
python tools/build.py --toolchain=cmake/toolchain_linux_armv7l.cmake
```

**Use system memory allocator**

```bash
python tools/build.py --system-allocator=on --jerry-libc=off
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it would be good to add --compile-flag=-m32 to the command or add some hints about how to build to 32bit.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bzsolt, this is why I wrote a note. :)

```

*Note*: System allocator is only supported on 32 bit systems.

**Enable 32bit compressed pointers**

```bash
python tools/build.py --cpointer-32bit=on
```

*Note*: There is no compression/decompression on 32 bit systems, if enabled.

**Change default heap size (512K)**

```bash
python tools/build.py --mem-heap=256
```

If you would like to use more than 512K, then you must enable the 32 bit compressed pointers.

```bash
python tools/build.py --cpointer-32bit=on --mem-heap=1024
```

*Note*: The heap size will be allocated statically at compile time, when JerryScript memory
allocator is used.

**To get a list of all the available buildoptions for Linux**

```bash
Expand Down
22 changes: 17 additions & 5 deletions docs/02.API-REFERENCE.md
Original file line number Diff line number Diff line change
Expand Up @@ -1316,10 +1316,13 @@ jerry_get_utf8_string_length (const jerry_value_t value);

**Summary**

Copy the characters of a string into a specified buffer. The
'\0' character could occur in character buffer. Returns 0,
if the value parameter is not a string or the buffer is
not large enough for the whole string.
Copy the characters of a string into a specified cesu-8 buffer.
The '\0' character could occur in the character buffer. Returns 0,
if the value parameter is not a string or the buffer is not large
enough for the whole string.

*Note*: Does not put '\0' to the end of string, the return value identifies
the number of valid bytes in the output buffer.

**Prototype**

Expand Down Expand Up @@ -1362,9 +1365,12 @@ jerry_string_to_char_buffer (const jerry_value_t value,

Copy the characters of a string into a specified utf-8 buffer.
The '\0' character could occur in character buffer. Returns 0,
if the value parameter is not a string or the buffer isn't
if the value parameter is not a string or the buffer is not
large enough for the whole string.

*Note*: Does not put '\0' to the end of string, the return value identifies
the number of valid bytes in the output buffer.

**Prototype**

```c
Expand Down Expand Up @@ -1410,6 +1416,9 @@ parameter is not a string. It will extract the substring between the
specified start position and the end position (or the end of the string,
whichever comes first).

*Note*: Does not put '\0' to the end of string, the return value identifies
the number of valid bytes in the output buffer.

**Prototype**

```c
Expand Down Expand Up @@ -1462,6 +1471,9 @@ parameter is not a string. It will extract the substring between the specified
start position and the end position (or the end of the string, whichever
comes first).

*Note*: Does not put '\0' to the end of string, the return value identifies
the number of valid bytes in the output buffer.

**Prototype**

```c
Expand Down