Skip to Content
defold-typescript libraries
defold (official)

defold/extension-proto

Compile and use protobuf messages from Lua

  • GitHub: defold/extension-proto — pinned to c9db092
    1. This repo publishes no releases or tags. Add a commit archive URL — for the pinned commit, https://github.com/defold/extension-proto/archive/c9db0928cc5a452caf71d3c30cbff00b567c08d3.zip — to game.project under [project] dependencies, then Fetch Libraries in the Defold editor.
    2. Run bunx @defold-typescript/cli resolve to materialize its types.
    3. Import it under a namespace alias of your choice:
      import * as proto from "proto"

Functions

proto.encode_testp3_scalars(msg: table): string

Parameters

  • msg: table

Returns

  • msg: string

proto.decode_testp3_scalars(msg: string): table

Parameters

  • msg: string

Returns

  • msg: table

proto.encode_testp3_scalars_totext(msg: table): string

Parameters

  • msg: table

Returns

  • msg: string

proto.decode_testp3_scalars_fromtext(msg: string): table

Parameters

  • msg: string

Returns

  • msg: table

proto.encode_testp3_outer(msg: table): string

Parameters

  • msg: table

Returns

  • msg: string

proto.decode_testp3_outer(msg: string): table

Parameters

  • msg: string

Returns

  • msg: table

proto.encode_testp3_outer_totext(msg: table): string

Parameters

  • msg: table

Returns

  • msg: string

proto.decode_testp3_outer_fromtext(msg: string): table

Parameters

  • msg: string

Returns

  • msg: table

proto.encode_testp3_basic(msg: table): string

Parameters

  • msg: table

Returns

  • msg: string

proto.decode_testp3_basic(msg: string): table

Parameters

  • msg: string

Returns

  • msg: table

proto.encode_testp3_basic_totext(msg: table): string

Parameters

  • msg: table

Returns

  • msg: string

proto.decode_testp3_basic_fromtext(msg: string): table

Parameters

  • msg: string

Returns

  • msg: table

proto.encode_testp3_container(msg: table): string

Parameters

  • msg: table

Returns

  • msg: string

proto.decode_testp3_container(msg: string): table

Parameters

  • msg: string

Returns

  • msg: table

proto.encode_testp3_container_totext(msg: table): string

Parameters

  • msg: table

Returns

  • msg: string

proto.decode_testp3_container_fromtext(msg: string): table

Parameters

  • msg: string

Returns

  • msg: table

proto.encode_testp3_oneof(msg: table): string

Parameters

  • msg: table

Returns

  • msg: string

proto.decode_testp3_oneof(msg: string): table

Parameters

  • msg: string

Returns

  • msg: table

proto.encode_testp3_oneof_totext(msg: table): string

Parameters

  • msg: table

Returns

  • msg: string

proto.decode_testp3_oneof_fromtext(msg: string): table

Parameters

  • msg: string

Returns

  • msg: table

proto.encode_testp2_scalars(msg: table): string

Parameters

  • msg: table

Returns

  • msg: string

proto.decode_testp2_scalars(msg: string): table

Parameters

  • msg: string

Returns

  • msg: table

proto.encode_testp2_scalars_totext(msg: table): string

Parameters

  • msg: table

Returns

  • msg: string

proto.decode_testp2_scalars_fromtext(msg: string): table

Parameters

  • msg: string

Returns

  • msg: table

proto.encode_testp2_outer(msg: table): string

Parameters

  • msg: table

Returns

  • msg: string

proto.decode_testp2_outer(msg: string): table

Parameters

  • msg: string

Returns

  • msg: table

proto.encode_testp2_outer_totext(msg: table): string

Parameters

  • msg: table

Returns

  • msg: string

proto.decode_testp2_outer_fromtext(msg: string): table

Parameters

  • msg: string

Returns

  • msg: table

proto.encode_testp2_basic(msg: table): string

Parameters

  • msg: table

Returns

  • msg: string

proto.decode_testp2_basic(msg: string): table

Parameters

  • msg: string

Returns

  • msg: table

proto.encode_testp2_basic_totext(msg: table): string

Parameters

  • msg: table

Returns

  • msg: string

proto.decode_testp2_basic_fromtext(msg: string): table

Parameters

  • msg: string

Returns

  • msg: table

proto.encode_testp2_container(msg: table): string

Parameters

  • msg: table

Returns

  • msg: string

proto.decode_testp2_container(msg: string): table

Parameters

  • msg: string

Returns

  • msg: table

proto.encode_testp2_container_totext(msg: table): string

Parameters

  • msg: table

Returns

  • msg: string

proto.decode_testp2_container_fromtext(msg: string): table

Parameters

  • msg: string

Returns

  • msg: table

proto.encode_testp2_oneof(msg: table): string

Parameters

  • msg: table

Returns

  • msg: string

proto.decode_testp2_oneof(msg: string): table

Parameters

  • msg: string

Returns

  • msg: table

proto.encode_testp2_oneof_totext(msg: table): string

Parameters

  • msg: table

Returns

  • msg: string

proto.decode_testp2_oneof_fromtext(msg: string): table

Parameters

  • msg: string

Returns

  • msg: table

Constants

proto.TESTP3__LANGUAGE_LANGUAGE_LUA

proto.TESTP3__LANGUAGE_LANGUAGE_CPP

proto.TESTP3__LANGUAGE_LANGUAGE_JAVA

proto.TESTP2__LANGUAGE_LANGUAGE_LUA

proto.TESTP2__LANGUAGE_LANGUAGE_CPP

proto.TESTP2__LANGUAGE_LANGUAGE_JAVA

On this page

Functionsproto.encode_testp3_scalars(msg: table): stringproto.decode_testp3_scalars(msg: string): tableproto.encode_testp3_scalars_totext(msg: table): stringproto.decode_testp3_scalars_fromtext(msg: string): tableproto.encode_testp3_outer(msg: table): stringproto.decode_testp3_outer(msg: string): tableproto.encode_testp3_outer_totext(msg: table): stringproto.decode_testp3_outer_fromtext(msg: string): tableproto.encode_testp3_basic(msg: table): stringproto.decode_testp3_basic(msg: string): tableproto.encode_testp3_basic_totext(msg: table): stringproto.decode_testp3_basic_fromtext(msg: string): tableproto.encode_testp3_container(msg: table): stringproto.decode_testp3_container(msg: string): tableproto.encode_testp3_container_totext(msg: table): stringproto.decode_testp3_container_fromtext(msg: string): tableproto.encode_testp3_oneof(msg: table): stringproto.decode_testp3_oneof(msg: string): tableproto.encode_testp3_oneof_totext(msg: table): stringproto.decode_testp3_oneof_fromtext(msg: string): tableproto.encode_testp2_scalars(msg: table): stringproto.decode_testp2_scalars(msg: string): tableproto.encode_testp2_scalars_totext(msg: table): stringproto.decode_testp2_scalars_fromtext(msg: string): tableproto.encode_testp2_outer(msg: table): stringproto.decode_testp2_outer(msg: string): tableproto.encode_testp2_outer_totext(msg: table): stringproto.decode_testp2_outer_fromtext(msg: string): tableproto.encode_testp2_basic(msg: table): stringproto.decode_testp2_basic(msg: string): tableproto.encode_testp2_basic_totext(msg: table): stringproto.decode_testp2_basic_fromtext(msg: string): tableproto.encode_testp2_container(msg: table): stringproto.decode_testp2_container(msg: string): tableproto.encode_testp2_container_totext(msg: table): stringproto.decode_testp2_container_fromtext(msg: string): tableproto.encode_testp2_oneof(msg: table): stringproto.decode_testp2_oneof(msg: string): tableproto.encode_testp2_oneof_totext(msg: table): stringproto.decode_testp2_oneof_fromtext(msg: string): tableConstantsproto.TESTP3__LANGUAGE_LANGUAGE_LUAproto.TESTP3__LANGUAGE_LANGUAGE_CPPproto.TESTP3__LANGUAGE_LANGUAGE_JAVAproto.TESTP2__LANGUAGE_LANGUAGE_LUAproto.TESTP2__LANGUAGE_LANGUAGE_CPPproto.TESTP2__LANGUAGE_LANGUAGE_JAVA