Skip to content

Releases

tpathexp v1.1.0

Choose a tag to compare

@jerily jerily released this 02 Nov 15:54
096b3d1

Native routing and selectable shared/static builds.

  • Add a public C route-table API with compiled route definitions, method masks, named parameters, ordered matching, GET/HEAD handling, and 404/405 results.
  • Implement the Tcl router, dispatch, and Lambda event adapters in C using the same route table. Remove the TclOO implementation and its Tcl source file.
  • Honor BUILD_SHARED_LIBS: ON (default) builds only the loadable module; OFF builds only the static archive. The static package index loads a package registered by the embedding host.
  • Move response construction into the examples. Handlers return ordinary response dictionaries; tpathexp::response is no longer exported.

Migration: embedded hosts can call Tpathexp_Init directly or register Tpathexp with Tcl_StaticPackage and use the installed package index. No Tcl implementation file needs to be sourced. Use separate build/install directories when changing library type.

Validated on Tcl 8.6 and 9.1 in both modes: 48 Tcl tests, native C routing, static embedding and child interpreters, install contents, and the examples. ASan, UBSan, and LeakSanitizer passed. The standalone C route-table example links without Tcl.

Download tpathexp-1.1.0.tar.gz and verify it with SHA256SUMS. Build for your runtime's Tcl ABI, operating system, and architecture:

cmake -S . -B build -DCMAKE_BUILD_TYPE=Release
cmake --build build
ctest --test-dir build --output-on-failure

Add -DBUILD_SHARED_LIBS=OFF to configure a static build. See the README and examples/router.c for the C API.

tpathexp v1.0.0

Choose a tag to compare

@jerily jerily released this 02 Nov 15:05

Initial public release of tpathexp, a Tcl/C extension for compiled path matching and HTTP route dispatch.

  • Reusable native matchers with named parameters, custom POSIX regular expressions, and correctly indexed nested captures.
  • Ordered Tcl routing with GET/HEAD support, 404 responses, and 405 responses with an Allow header.
  • AWS Lambda adapters for decoded API Gateway payloads 1.0/2.0 and Function URL events, with an example handler that reuses its route table across invocations.
  • Shared-module and static-library builds for Tcl 8.6 and Tcl 9.x, plus installation and embedding examples.

Validation: all 40 Tcl tests passed with Tcl 8.6 and 9.1. Static embedding, package installation, and the Lambda example also passed. AddressSanitizer and UndefinedBehaviorSanitizer checks passed with leak detection disabled because of the test environment.

Download tpathexp-1.0.0.tar.gz and verify it against SHA256SUMS. This release ships source; build it for your runtime's Tcl ABI, operating system, and architecture.

tar -xzf tpathexp-1.0.0.tar.gz
cd tpathexp-1.0.0
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release
cmake --build build
ctest --test-dir build --output-on-failure

The Lambda host runtime supplies JSON decoding/encoding and the invocation loop. See the README for API details and packaging instructions.