Skip to content

sco_api.provide_service

Any thread. Publishes vtable under name (“<plugin id>” or “<plugin id>.<name>”, [a-z0-9_.], 1-63 chars) with version (major << 16) | minor. SCO_BAD_ARG: a bad or taken name, or a name outside this plugin’s id. Withdrawn when this plugin unloads or crashes, or by release_service. Start the table with a uint32_t size so it can grow.

sco_result (*)(sco_plugin *, const char *, uint32_t, const void *)

Service index

Property Value
Symbol sco_api.provide_service
Record ID sco-api-provide-service
Service sco_api
Table sco_api
Version macro SCO_API_MAJOR/SCO_API_MINOR
Packed table version 65537
Since / availability size &gt;= 96; 1.1
Complete member extent (x64 bytes) 96
Table size (x64 bytes) 128

Header source

sco_result (*provide_service)(sco_plugin* self, const char* name, uint32_t version, const void* vtable);
Any thread. Publishes vtable under name (“<plugin id>” or “<plugin id>.<name>”, [a-z0-9_.], 1-63 chars) with version (major << 16) | minor. SCO_BAD_ARG: a bad or taken name, or a name outside this plugin’s id. Withdrawn when this plugin unloads or crashes, or by release_service. Start the table with a uint32_t size so it can grow.

BAD_ARG invalid/released self, NULL table, invalid/taken/out-of-prefix name; TOO_MANY allocation. No capability gate.

unspecified

Host copies name/version, borrows table contents/code until withdrawal or unload; provider retains state ownership. Registry allocation may fail.

Any thread; reentrancy unspecified.

unspecified

unspecified

release_service or owner unload/crash withdraws lookup; no cancellation/quiescence guarantee for calls already using table.

Status labels are copied verbatim from the catalogue: direct is native access; typed-wrapper is wrapper-backed; restricted is a subset/adaptation; unsupported means no supported route is established. No status implies universal safety.

Language Catalogue status Source evidence / wrapper tokens
c direct include/sco_api.h
(*provide_service)
cpp typed-wrapper include/scosdk/service.hpp
return plugin.Api()->provide_service(plugin.Self(), name, version, table);
csharp typed-wrapper sdk/csharp/Sco.Sdk/Services.cs
fixed (byte* n = Utf8.Z(name)) return a->provide_service(SelfPtr, n, version, table);
lua unsupported sdk/docs/lua.md
The script sees only:
sdk/docs/lua.md
There is no io, os, package, require, debug, dofile, loadfile or FFI

ABI pins prove layout, not semantic behavior or a live game session.