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.
| Library | What it does |
|---|---|
| SpecsPlayer | Play media files with minimal setup |
| SpecsMedia | Low-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) |
| SpecsMediaGLTexture | Update a caller-owned OpenGL ES texture from a SpecsMediaBuffer video frame without a CPU copy |
| SpecsRecorder | Encoded camera video, AR video, or audio stream recording |
| SpecsCapture | One-shot camera+mic recording finalized to an MP4 file descriptor |
| SpecsAudio | Output PCM audio to speaker/submix (SpecsAudioPlayback) and capture audio from the microphone (SpecsAudioRecord) |
| SpecsForegroundAudioSession | Register audio content, call, and focus sessions with the system coordinator |
| SpecsCamera | Camera stream management |
| SpecsLocation | Fused location (GPS, heading, speed) |
| SpecsLog | System logging (printf-style, per-level macros) |
| SpecsFs | Resolve 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.hdeclares the OS permission each SPECS API requires, andspecs-perm-embedwrites the.snap.permissionsmanifest 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.sothat imports one of them getsINTERNET, even when it calls no SPECS APIs. See Permission Annotations and Manifest Embedding. - A version header,
SpecsNDKVersion.h, which reportsSPECS_NDK_VERSION_STRING"1.3.0". - A
licenses/directory at the root of every host tarball, withTHIRD_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.
| Host | Tarball | Clang | CMake | Ninja |
|---|---|---|---|---|
| macOS | specsndk-armv8-1.3.0-darwin21-x86_64.tar | 18.1.8 | Not bundled (supply 3.24 or later) | 1.11.1 |
| Windows | specsndk-armv8-1.3.0-mingw32-x86_64.tar | 22 (llvm-mingw) | 3.28.3 | 1.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.cmakeandSpecsNDK-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_LIBDIRandPKG_CONFIG_SYSROOT_DIRat the target sysroot, so CMake'sPkgConfigmodule finds the target libraries. - Permission manifest embedding with
specs-perm-embed, on both hosts. CMake builds embed the.snap.permissionsmanifest 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.