Skip to content

Commit d20ad22

Browse files
committed
docs about format of lib/bs/.bsbuild
1 parent e2ccc53 commit d20ad22

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

jscomp/bsb/data_format.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
2+
3+
# format about lib/bs/.bsbuild
4+
5+
This file (in binary) contains all file info needed in build.
6+
7+
It is encoded in bsb_db_encode.ml and bsb_db_decode.ml, the format is optimized for performance in decoding where it is used most.
8+
9+
10+
- The first 16 chars is digest of the following content
11+
12+
The rest is encoding for each group (source code and test), in most cases, you have one group or two groups (one for lib one for test).
13+
14+
Begining with a new line, the number of total groups (encoded in text format) are encoded.
15+
16+
17+
For each group, it starts with a newline and the
18+
number of modules (text format).
19+
20+
The following are list of modules in sorted order (Ext_string.compare) separated by newline.
21+
22+
The following are list of directories separated by tab character.
23+
24+
The next is a fixed length for module description, its encoding is hard coded in Bsb_db_encode.make_encoding

0 commit comments

Comments
 (0)