WoW lua-pb addon Dragonflight/Wrath of the Lich King Classic 2023
wow addon lua-pb


Game Version: 8.2.5
Total Downloads: 1,910
Updated: Oct 27, 2019
Created: Dec 23, 2012
download lua-pbDownload Earlier Versions

Earlier Versions

Name Size Uploaded Game Version Downloads
v1.1.0 release 24.72 KB Oct 27, 2019 8.2.5 218 download lua-pb v1.1.0 releaseDownload


Share this:


A Protocol Buffer implementation that runs on World of Warcraft Addons.
The lua-pb is based on the work of <; by Neopallium

Generate lua stub for your addon

  • install lpge

luarocks install lpeg

  • generate with saveast.lua

lua saveast.lua VARNAME &lt; FILE.proto &gt; STUB.lua

exmaple for using person.proto in wowtest folder
lua saveast.lua pbperson &lt; person.proto &gt; wowtest/person.lua

Import in your addon

You have two choices to use lua-pb as a library

As files inside your addon

  1. Download relase zip from <;
  2. Copy lua-pb folder to your addon
  3. Add path\to\lua-pb\lua-pb.xml in your .toc file
  4. Add path\to\pbstub.lua in your .toc file

After loaded, lua-pb would be availiable in your addon ctx

Example (you can find exmaple in <wowtest/pb-wow-test.lua>)

local _, ADDONSELF = …

local luapb = ADDONSELF.luapb
local person = luapb.loadprotoast(ADDONSELF.pbperson).Person

local msg0 = person() = "aa" = 1

print("serialize: name " .. .. " id " ..

local t = msg0:Serialize()

assert(#t > 0, "size of t > 0")

local msg1 = person()

assert( ==, "name not equal")
assert( ==, "id not equal")

print("deserialize: name " .. .. " id " ..


Use as an dependency (Optional for LibStub)

local luapb = LibStub:GetLibrary('luapb')

Powered by lua-pb

  • Myslot


Add a comment