Skip to content

Commit

Permalink
docs: update README, link to docs.
Browse files Browse the repository at this point in the history
  • Loading branch information
h4l committed Sep 21, 2024
1 parent 15a157d commit 661c25a
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,22 @@
<img src="docs/v8serialize_logo_auto.svg" width="300" alt="The v8serialize logo. Monochome. Large &quot;V8&quot; and smaller &quot;serialize&quot; in a handwritten style, with the 8 stylized to look like a snake.">
</p>

# `v8serialize`
<p align="center"><em>Imagine having <a href="https://developer.mozilla.org/en-US/docs/Web/API/Window/postMessage"><code>postMessage()</code></a> between JavaScript and Python.</em></p>

Read & write JavaScript values in [V8 serialization format] with Python.
<table align="center">
<tr>
<td><pre lang="shell">pip install v8serialize</pre></td>
</tr>
</table>

[V8 serialization format]:
https://chromium.googlesource.com/v8/v8/+/refs/heads/main/src/objects/value-serializer.cc
<p align="center"><a href="https://h4l.github.io/v8serialize/en/latest/">Documentation</a></p>

## Byte order/endianness
---

V8 uses the native byte order when serialising data. This library explicitly
uses little endian. This is because:
# `v8serialize`

- The vast majority of systems using V8 are little endian
- Because the serialized byte order is native, when people use it to store
persistent data they are probably assuming little-endian systems will read it
later.
- I don't have a big-endian system or VM to test against
A Python library to read & write JavaScript values in [V8 serialization format]
with Python.

In principle there's no thing to stop prevent adding big endian support though.
[V8 serialization format]:
https://h4l.github.io/v8serialize/en/latest/explanation/v8_serialization_format.html

0 comments on commit 661c25a

Please sign in to comment.