ludic/packages/ludic.nativeecho
Orkuncakilkaya 0e3cef813f feat(pkg): windows-x64 builds of ludic.physics (Jolt v5.6.0) and ludic.nativeecho, built on the PC by their native/build.sh
tools/native/lib.sh passes -implib rather than /implib: Git Bash rewrites an argument starting
with / into a Windows path, and lld-link was handed 'C:\Program Files\Git\implib;...'. Both DLLs
import KERNEL32 alone, so no C++ runtime ships beside them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-27 13:29:55 +03:00
..
lib feat(pkg): windows-x64 builds of ludic.physics (Jolt v5.6.0) and ludic.nativeecho, built on the PC by their native/build.sh 2026-09-27 13:29:55 +03:00
native feat(pkg): phase 15 - a package can carry a native library 2026-09-26 23:35:45 +03:00
tests feat(pkg): phase 15 - a package can carry a native library 2026-09-26 23:35:45 +03:00
echo.ludic refactor(packages): 0.R5 - the shop's week is rolled by its tick and asking reads it; needs start filled and vehicles start with their list; character, physics, vehicles and nativeecho's lazy starts are defaults; --tighten over all four 2026-09-27 13:25:57 +03:00
index.ludic feat(pkg): phase 15 - a package can carry a native library 2026-09-26 23:35:45 +03:00
native.ludic feat(pkg): phase 15 - a package can carry a native library 2026-09-26 23:35:45 +03:00
package.ludic feat(pkg): phase 15 - a package can carry a native library 2026-09-26 23:35:45 +03:00
README.md feat(pkg): phase 15 - a package can carry a native library 2026-09-26 23:35:45 +03:00

ludic.nativeecho

The worked example of a package that carries a native library (phase 15). It exists to be copied and to be tested: nothing in a game needs it.

import "ludic.nativeecho"
  • package.ludic names the library per target (native "macos-arm64" "lib/macos-arm64/libnativeecho.dylib").
  • native/shim/nativeecho.c is the whole library: a sum over a float slice, a scan that "calls back" once per value over a threshold, and the drain the package empties those records through.
  • native/build.sh builds lib/<target>/ through tools/native/lib.sh (no upstream to fetch).
  • native.ludic declares the symbols; echo.ludic is the state, the verbs and the facts.
EchoState the slices that cross to C (made once), and the facts queue
echo_put(st, x) -> bool, echo_clear(st) fill the slice
echo_sum(st) -> float the sum, in C
echo_scan(st, over) -> int C records each value over over; they arrive on echo_facts(st) as EchoFact { index, value }
echo_lost() -> int, echo_twice(x: long) -> long the lost-record count, and a 64-bit round trip

The rules it keeps are the shim rules in packages/README.md. ludic test packages/ludic.nativeecho runs it against the real library.