Skip to main content

SPECS NDK v1.3.0

SPECS NDK v1.3.0 is the first public release of the SPECS NDK, the native C toolkit for building native libraries for Lenses on SPECS.

SPECS NDK v1.3.0 is the first public release of the SPECS NDK. It is a cross-compilation toolkit for building native C and C++ libraries for Lenses on ARMv8-A 64-bit SPECS devices (aarch64-snap-linux), with C APIs for media playback, audio I/O, camera access, encoded recording, MP4 capture, GPU texture output of media frames, foreground audio session coordination, location services, system logging and app directory resolution. Libraries built with it run on SPECS OS 3.0.0 or later.

What's in the SPECS NDK v1.3.0 release

The SPECS NDK v1.3.0 release ships these 11 SPECS platform libraries. Each one has its own API reference page.

LibraryWhat it does
SpecsPlayerPlay media files with minimal setup
SpecsMediaLow-level encode/decode pipeline (SpecsMediaCodec), demuxing raw samples from media files (SpecsMediaExtractor), timed presentation of decoded buffers to display (SpecsMediaPresenter) and reference-counted hardware buffer management (SpecsMediaBuffer)
SpecsMediaGLTextureUpdate a caller-owned OpenGL ES texture from a SpecsMediaBuffer video frame without a CPU copy
SpecsRecorderEncoded camera video, AR video, or audio stream recording
SpecsCaptureOne-shot camera+mic recording finalized to an MP4 file descriptor
SpecsAudioOutput PCM audio to speaker/submix (SpecsAudioPlayback) and capture audio from the microphone (SpecsAudioRecord)
SpecsForegroundAudioSessionRegister audio content, call, and focus sessions with the system coordinator
SpecsCameraCamera stream management
SpecsLocationFused location (GPS, heading, speed)
SpecsLogSystem logging (printf-style, per-level macros)
SpecsFsResolve the app's data and library root directories (header-only on the device)

The SPECS NDK v1.3.0 release also includes:

  • Permission annotations and automatic manifest embedding. SpecsPermissions.h declares the OS permission each SPECS API requires, and specs-perm-embed writes the .snap.permissions manifest into every application .so. The NDK's permission map (usr/share/specsndk/specs-permissions.json) also lists the network-facing functions of libcurl (libcurl.so.4), OpenSSL libcrypto (libcrypto.so.3) and libc (libc.so.6), so any .so that imports one of them gets INTERNET, even when it calls no SPECS APIs. See Permission Annotations and Manifest Embedding.
  • A version header, SpecsNDKVersion.h, which reports SPECS_NDK_VERSION_STRING "1.3.0".
  • A licenses/ directory at the root of every host tarball, with THIRD_PARTY_NOTICES.txt (package, license and full license text for each bundled third-party package) and an SPDX SBOM, specsndk-armv8-1.3.0-<host>-x86_64.spdx.json.

Minimum SPECS OS for SPECS NDK v1.3.0

Native libraries built with SPECS NDK v1.3.0 require SPECS OS 3.0.0 or later on the device.

Host platforms and build tooling in SPECS NDK v1.3.0

SPECS NDK v1.3.0 ships one tarball for each host platform, each with a matching OSS source package for its GPL and LGPL components. Both are on the Downloads page.

HostTarballClangCMakeNinja
macOSspecsndk-armv8-1.3.0-darwin21-x86_64.tar18.1.8Not bundled (supply 3.24 or later)1.11.1
Windowsspecsndk-armv8-1.3.0-mingw32-x86_64.tar22 (llvm-mingw)3.28.31.11.1

Both Clang versions target the same target sysroot and produce ABI-compatible aarch64 binaries. To install the SDK on your host, start with Prerequisites and NDK Layout, then follow Host Setup on macOS or Host Setup on Windows.

The SPECS NDK v1.3.0 build tooling includes:

  • CMake toolchain files, SpecsNDK-Toolchain-Clang.cmake and SpecsNDK-Toolchain-common.cmake, identical in the macOS and Windows bundles. See Build your first Native Lens.
  • A macOS Simulator toolchain, SpecsNDK-Toolchain-Simulator-macOS.cmake, in the macOS bundle. See macOS Simulator.
  • pkg-config support: the toolchain points PKG_CONFIG_LIBDIR and PKG_CONFIG_SYSROOT_DIR at the target sysroot, so CMake's PkgConfig module finds the target libraries.
  • Permission manifest embedding with specs-perm-embed, on both hosts. CMake builds embed the .snap.permissions manifest automatically. See Permission Annotations and Manifest Embedding, and Permission Embedding with Bazel for Bazel builds.

The supported target libraries in SPECS NDK v1.3.0 are OpenSSL 3.5.7, libcurl 8.7.1 and zlib 1.3.1. See Open Source Libraries.