The GS1 Barcode Syntax Engine ("Syntax Engine") supports processing of GS1 syntax data, including Application Identifier element strings and GS1 Digital Link URIs.
The project is a component of the GS1 Barcode Syntax Resource that serves as a reference implementation of a framework for processing the GS1 Barcode Syntax Dictionary and its subordinate GS1 Barcode Syntax Tests.
The GS1 Barcode Syntax Engine consists of a native C library together with bindings for C# .NET, Java, Swift, and JavaScript + WebAssembly, providing idiomatic interfaces to the native library from a variety of high-level programming languages.
| Language/binding | Technology | Platforms | Documentation links |
|---|---|---|---|
| C | Native code | Cross-platform, embedded | Overview, Quick Start, Examples, API reference |
| C# .NET | P/Invoke wrapper | Windows, Linux, macOS | Overview, Quick Start, Examples, API reference |
| Java (and Android) | JNI wrapper | Cross-platform, Android | Overview, Quick Start, Examples, API reference |
| Swift (and iOS) | C interoperability | macOS, iOS | Overview, Quick Start, Examples, API reference |
| JavaScript | WebAssembly | Browser, Node.js | Overview, Quick Start, Examples, API reference |
It is intended to be integrated into a wide variety of deployment scenarios.
There is a large corpus of example code.
C:
C# .NET:
Java:
Swift:
JavaScript/WASM:
- Browser-based web application (source)
- Node.js console application (source)
- Node.js HTTP web service with example client (source)
Pre-built demonstration applications are available for quick evaluation without needing to build from source. All demos can be downloaded from the latest release.
| Application | Filename | Instructions |
|---|---|---|
| Windows console | gs1encoders-windows-console-app.zip |
Console Guide |
| Linux console | gs1encoders-linux-app.zip |
Console Guide |
| Windows desktop | gs1encoders-windows-gui-app.zip |
Desktop Guide |
| Browser app | gs1encoders-wasm-app.zip |
Serve example.{html+mjs}, gs1encoder.mjs, gs1encoder-wasm.{mjs+wasm}; .wasm must have MIME type: application/wasm |
| Node.js console | gs1encoders-wasm-app.zip |
Run node example.node.mjs |
| - | gs1encoders-jsonly-app.zip |
Pure JavaScript (asm.js) alternative to WASM build; No .wasm file |
The library is also provided in the form of a pre-built library for Windows (portable DLL), along with associated development headers (.h) and linker (.lib) files available from the releases page.
Filename: gs1encoders-windows-libs.zip.
The license is permissive allowing for the source code to be vendored into an application codebase (Open Source or proprietary) or for the pre-built shared library to be redistributed with an application.
Source code is organised in the following directories:
| Directory | Purpose |
|---|---|
src/c-lib |
Source for the native C library, unit tests, fuzzers and demo console application |
src/dotnet-lib |
C# .NET wrapper source |
src/dotnet-app |
Demo C# .NET desktop application (WPF) source |
src/java |
Java wrapper source and demo console application |
src/swift |
Swift package source with demo console application |
src/js-wasm |
JavaScript wrapper source with demo web and Node.js applications |
src/android |
Android Studio project source demonstrating mobile integration |
src/ios |
Xcode project source demonstrating iOS integration |