Skip to content

Commit 0b457a9

Browse files
authored
[skip changelog] Update library specification to reflect recently added features (#789)
* [skip ci] Remove outdated statement re: Library Manager not handling library dependencies Dependencies of libraries may now be defined via the depends field of library.properties and Library Manager will automatically install these dependencies when the library is installed. This is well documented later in the specification, so there is no need to mention it in the Library Manager overview. * [skip ci] Update documentation re: library "import" behavior The described behavior is now configurable via the includes field of library.properties.
1 parent b814e2a commit 0b457a9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/library-specification.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ This is the specification for the 3rd party library format to be used with Ardui
55
* rev.2.1 will be implemented starting from version Arduino IDE 1.6.10
66
* rev.2.2 will be implemented starting from version Arduino IDE 1.8.10
77

8-
This new library format is intended to be used in tandem with **Library Manager**, available since Arduino IDE 1.6.2. The Library Manager allows users to automatically download and install libraries needed in their projects, with an easy to use graphic interface in the [Arduino IDE](https://www.arduino.cc/en/guide/libraries#toc3)/Pro IDE and [Arduino Web Editor](https://create.arduino.cc/projecthub/Arduino_Genuino/getting-started-with-arduino-web-editor-on-various-platforms-4b3e4a#toc-libraries-and-the-arduino-web-editor-11) as well as [`arduino-cli lib`](https://arduino.github.io/arduino-cli/commands/arduino-cli_lib/). It doesn't yet take care of dependencies between libraries.
8+
This new library format is intended to be used in tandem with **Library Manager**, available since Arduino IDE 1.6.2. The Library Manager allows users to automatically download and install libraries needed in their projects, with an easy to use graphic interface in the [Arduino IDE](https://www.arduino.cc/en/guide/libraries#toc3)/Pro IDE and [Arduino Web Editor](https://create.arduino.cc/projecthub/Arduino_Genuino/getting-started-with-arduino-web-editor-on-various-platforms-4b3e4a#toc-libraries-and-the-arduino-web-editor-11) as well as [`arduino-cli lib`](https://arduino.github.io/arduino-cli/commands/arduino-cli_lib/).
99

1010
More information about how Library Manager works is available [here](https://github.com/arduino/Arduino/wiki/Library-Manager-FAQ).
1111

@@ -83,7 +83,7 @@ For 1.5.x+-only libraries, the source code resides in the **src** folder. For ex
8383
Servo/src/Servo.h
8484
Servo/src/Servo.cpp
8585

86-
The source code found in **src** folder and *all its subfolders* is compiled and linked in the user’s sketch. Only the *src* folder is added to the include search path (both when compiling the sketch and the library). When the user imports a library into their sketch (from the Arduino IDE's "Sketch > Include Library" menu or the Arduino Web Editor's "Include" button), an `#include` statement will be added for all header (.h) files in the src/ directory (but not its subfolders). As a result, these header files form something of a de facto interface to your library; in general, the only header files in the root src/ folder should be those that you want to expose to the user's sketch and plan to maintain compatibility with in future versions of the library. Place internal header files in a subfolder of the src/ folder.
86+
The source code found in **src** folder and *all its subfolders* is compiled and linked in the user’s sketch. Only the *src* folder is added to the include search path (both when compiling the sketch and the library). When the user imports a library into their sketch (from the Arduino IDE's "Sketch > Include Library" menu or the Arduino Web Editor's "Include" button), the default behavior (configurable via the [library.properties `includes` field](#libraryproperties-file-format)) is for an `#include` statement to be added for all header (.h) files in the src/ directory (but not its subfolders). As a result, these header files form something of a de facto interface to your library; in general, the only header files in the root src/ folder should be those that you want to expose to the user's sketch and plan to maintain compatibility with in future versions of the library. Place internal header files in a subfolder of the src/ folder.
8787

8888
For backward compatibility with Arduino IDE 1.0.x, the library author may opt to place source code into the root folder, instead of the folder called **src**. In this case the 1.0 library format is applied and the source code is searched from the **library root folder** and the **utility** folder, for example:
8989

0 commit comments

Comments
 (0)