Add eslint.config.mjs (eslint:recommended + typescript-eslint recommended,
type-unaware) with a `lint` script and a CI step. Rules that need a baseline
cleanup pass (no-explicit-any, ban-ts-comment, no-useless-assignment,
preserve-caught-error) are warnings; core rules and unused vars are errors.
Refs Heretek-Games/drop#69 (audit finding F-23).
Pin actions/checkout, setup-node, upload-artifact, setup-dotnet, and
github-script to immutable commit SHAs (version kept in a trailing comment) so
a moved tag cannot change the code executed in CI.
Refs Heretek-Games/drop#69 (audit finding F-23).
Add a private vulnerability-reporting policy and weekly Dependabot updates
(npm/cargo as applicable + GitHub Actions) to satisfy the org security-posture
baseline.
Refs Heretek-Games/drop#69
- Wrap every extern "C" entry point in catch_unwind so a Rust panic becomes
DROPWORKS_ERR_INTERNAL instead of unwinding across the ABI (UB).
- Add _n length-prefixed variants (sign_in, unlock_achievement, submit_score,
set_presence) that read (ptr,len) and reject over-cap lengths/invalid UTF-8;
the NUL-terminated functions now delegate to them.
- Tag clients with a unique id and bind sessions to the creating client;
cross-client session use is rejected with a typed error.
- submit_score writes DROPWORKS_BOOL_UNKNOWN (-1) when the server omits
'improved' instead of assuming true.
Closes#3
- dropworks_client.gd: DropworksClient over the engine HTTPClient with
pure request builders and parse_endpoint, plus sign_in / unlock /
submit_score / set_presence.
- test_dropworks.gd runs headlessly under Godot 4.3 and passes.
- CI gains a gdscript job; README documents usage and the test command.
- Dropworks class library: DropworksNative (raw P/Invoke), a managed
DropworksClient/Session/Exception over the C ABI (session, achievement,
leaderboard, presence).
- Dropworks.Smoke console app verifies the binding against the real
libdropworks: builds clean and the smoke test passes (status strings,
argument validation, last_error).
- CI gains a csharp job; README documents build/run.
- TypeScript: setPresence(status, gameId?) -> POST /api/v1/dropworks/presence.
- Rust: set_presence(status, Option<gameId>) with the session bearer token.
- C ABI: dropworks_set_presence now posts (no longer NOT_IMPLEMENTED),
with pointer/argument validation.
- Tests in all three clients; the C smoke test passes against libdropworks
and the header documents the endpoint.
Completes C ABI parity with the TypeScript and Rust clients:
- Declare dropworks_submit_score in include/dropworks.h.
- Implement it in the cabi module (bearer-authenticated POST to
/api/v1/dropworks/leaderboard; reports the improved flag; validates all
pointers and a finite score).
- Extend the Rust cabi test and the C smoke test (NULL session is
rejected); the smoke test still passes against the real libdropworks.
- TypeScript reference client: submitScore(key, score) -> POST
/api/v1/dropworks/leaderboard.
- Rust binding: submit_score(key, score) with argument validation and the
session bearer token, mirroring the REST contract.
- Tests in both clients (requires sign-in; posts the contract body).
- bindings/c/smoke.c exercises client creation, argument validation,
status strings and cleanup against the real libdropworks, with no
network required.
- CI gains a c-abi job that builds the shared library, compiles and runs
the smoke test; the Rust job now also runs the cabi unit tests.
- Docs record the exact build/run commands.
Phase 3 / #19 native bindings:
- Add a cabi module behind the c-abi feature (crate-type cdylib+rlib)
implementing include/dropworks.h: client/session create+destroy, session
getters, sign_in, unlock_achievement, set_presence (NOT_IMPLEMENTED),
status_string and last_error.
- Uses a per-client blocking reqwest client and validates every pointer
argument; unlock attaches the session bearer token (the server now
requires it on /achievement).
- 4 C ABI tests (status strings, null handling, invalid arguments) plus
the existing transport tests; builds libdropworks.so.
- Document that the server contract landed in drop (45515274).