24 Commits
Author SHA1 Message Date
BillyOutlast b5516f6103 fix(cabi): wrap status_string and last_error in panic guard
Closes #11
2026-09-17 21:12:34 -04:00
dependabot[bot] f576d78f18 chore(deps): bump actions/setup-node from 4.4.0 to 7.0.0 (#10)
Bumps [actions/setup-node](https://github.com/actions/setup-node) from 4.4.0 to 7.0.0.
- [Release notes](https://github.com/actions/setup-node/releases)
- [Commits](https://github.com/actions/setup-node/compare/49933ea5288caeca8642d1e84afbd3f7d6820020...820762786026740c76f36085b0efc47a31fe5020)

---
updated-dependencies:
- dependency-name: actions/setup-node
  dependency-version: 7.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-09-15 11:37:55 -04:00
dependabot[bot] 1009e536fe chore(deps): bump actions/checkout from 4.4.0 to 7.0.1 (#8)
Bumps [actions/checkout](https://github.com/actions/checkout) from 4.4.0 to 7.0.1.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/11d5960a326750d5838078e36cf38b85af677262...3d3c42e5aac5ba805825da76410c181273ba90b1)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: 7.0.1
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-09-15 11:37:44 -04:00
BillyOutlast ef261507f7 Merge pull request #5 from Heretek-Games/chore/security-policy-and-dependabot
[audit] Add SECURITY.md and Dependabot config
2026-09-14 22:05:56 -04:00
BillyOutlast b211922e05 Merge pull request #4 from Heretek-Games/fix/c-abi-hardening
[audit] Harden the Dropworks C ABI
2026-09-14 22:05:53 -04:00
BillyOutlast 845447c924 fix(c-abi): map improved sentinel correctly and reject over-cap presence 2026-09-14 21:02:45 -04:00
BillyOutlast 3b54fa5cb6 ci: add a shared ESLint flat-config lint gate
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).
2026-09-14 19:59:40 -04:00
BillyOutlast fdbd24acf3 ci: pin GitHub Actions to commit SHAs
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).
2026-09-14 19:41:06 -04:00
BillyOutlast 5d752ad682 chore: add SECURITY.md and Dependabot config
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
2026-09-14 19:36:16 -04:00
BillyOutlast 85dc0c696c fix(c-abi): add panic boundary, length-prefixed strings, session binding
- 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
2026-09-14 18:07:54 -04:00
BillyOutlast e7a2c13591 docs: reflect the implemented language bindings and presence 2026-09-14 14:01:00 -04:00
BillyOutlast 548fe3fda7 feat(gdscript): add the Godot 4 Dropworks binding
- 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.
2026-09-14 13:44:57 -04:00
BillyOutlast 1dd9db75fb feat(csharp): add the Dropworks.Client P/Invoke binding
- 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.
2026-09-14 13:42:24 -04:00
BillyOutlast c68c60321a feat(sdk): add presence to the TypeScript, Rust and C clients
- 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.
2026-09-14 13:34:43 -04:00
BillyOutlast 89f5bc9d0c feat(c-abi): add dropworks_submit_score
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.
2026-09-14 13:26:22 -04:00
BillyOutlast 4bd9afb833 feat(sdk): add global leaderboard score submission
- 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).
2026-09-14 13:21:03 -04:00
BillyOutlast cc3f48d8f7 chore: add clangd include path for the C binding 2026-09-14 13:06:56 -04:00
BillyOutlast d01c2c75ad test(c-abi): add a compile-link-run smoke test and CI job
- 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.
2026-09-14 13:00:14 -04:00
BillyOutlast 040c20452d feat(rust): implement the libdropworks C ABI
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).
2026-09-14 12:50:23 -04:00
BillyOutlast 9e5171c7f3 Merge pull request #1 from Heretek-Games/feat/c-abi-rust-binding
feat(bindings): C ABI header + Rust client scaffold + CI
2026-09-14 09:14:35 -04:00
BillyOutlast 9baa38b40d fix(ci): install with --ignore-scripts and pin rust toolchain action 2026-09-14 09:10:12 -04:00
BillyOutlast 1bb10816a6 feat(bindings): add C ABI header and Rust client scaffold 2026-09-14 09:07:44 -04:00
BillyOutlast 40297fdb62 chore: add typecheck script and CI (node + rust) 2026-09-14 09:07:44 -04:00
BillyOutlast 61f53fdbdb feat(init): scaffold dropworks-sdk (plugin API v2) 2026-09-14 01:24:28 -04:00