Skip to content

[skip changelog] Fully document library layouts in specification #1458

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 1 commit into from
Sep 22, 2021
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
39 changes: 39 additions & 0 deletions docs/img/library-layout.dot
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
// See: https://www.graphviz.org/documentation/
digraph {
// This generates library-layout.png using the following command:
// dot -Tsvg -olibrary-layout.svg library-layout.dot
graph [
splines=line
]
node [
shape=box
]

subgraph {
// This subgraph provides the labels on left margin
node [
margin="0.0,0.0"
shape=none
width=0.0
]
"Metadata:" -> "Format:" -> "Structure:" -> "Layout:" [style=invis]
}

subgraph cluster1 {
peripheries=0
"library.properties" [height=1.0 margin="0.0,0.0" shape=diamond width=0.0]
"library.properties" -> "1.5" [label="yes"]
"library.properties" -> "1.0" [label="no"]
subgraph cluster2 {
peripheries=0
rank=same
"1.5"
"1.0"
}
"1.5" -> "src/"
"src/" [shape=diamond]
"src/" -> "recursive" [label=" yes"]
"src/" -> "flat" [label="no"]
"1.0" -> "flat"
}
}
117 changes: 117 additions & 0 deletions docs/img/library-layout.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions docs/library-specification.md
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,15 @@ only needs to run on Arduino IDE 1.5.x+, we recommend placing all source code in
recursive compilation of nested source folders, its code must be in the src/ folder (since Arduino IDE 1.0.x doesn’t
support recursive compilation, backwards compatibility wouldn’t be possible anyway).

##### Library layout

![Library layout](img/library-layout.svg)

| Layout | root compiled | `src` compiled | `utility` compiled |
| ------------- | ------------- | -------------- | ------------------ |
| **recursive** | no | recursively | no |
| **flat** | yes | no | yes |

#### Precompiled binaries

The `precompiled` field of [library.properties](#libraryproperties-file-format) enables support for the use of
Expand Down