Current state of libraries 2.0


Libraries 2.0 is still in prerelease.

What currently works

  • All previous public and private libraries available through the API
    Private libraries have been assigned unique suffixes like neopixel_123

  • Library support in the API

  • Library support in Particle CLI

  • Library support in Particle Dev

  • Add a published library to a project on your computer
    particle library add neopixel

  • Search for a library
    particle library search neo

  • Compile a project that includes a library using the cloud compiler
    particle compile photon .
    Libraries 2.0 support requires firmware 0.5.3 or later because of makefile changes

  • Compile an extended project that includes a vendored library using the local compiler
    modules$ make PLATFORM=photon APPDIR=~/myapp

  • Migrate a library from 1.0 to 2.0 format
    particle library migrate
    Run in your library root directory then commit to git

  • Create a blank new library
    particle library init

  • Upload a new library or a modified version of an existing library to the cloud for your own use (private library). Make sure to run migrate before publishing a new version of an existing library.
    particle library contribute

  • Publish a version of a private library so that others can use it (public library)
    particle library publish my_library

  • Libraries having dependencies on other libraries (goodbye copy-pasting other libraries inside your own!)
    Libraries depending on other libraries

What is still in development

  • Library support in Particle Build

Libraries 2.0 Resources guide

How would one build a specific sample of an already published library?

Does this involve copying the files of one examples folder into src or is there a dedicated command?


I just saw this question. I’ll look into it. It’s something we will support of course.


Original post updated with private libraries