-
Notifications
You must be signed in to change notification settings - Fork 0
Getting Started
Pt edited this page Jun 17, 2026
·
2 revisions
This guide is aimed at integrating Lc into real systems quickly and safely.
- Go
1.24+
go get github.com/pt-main/lc-
lc.StringEngineTypefor text-driven execution. -
lc.ByteEngineTypefor binary/opcode-driven execution.
package main
import (
"github.com/pt-main/lc"
"github.com/pt-main/lc/stringParsing"
)
func main() {
parser := &stringParsing.Parser2{}
_, _ = lc.NewEngineBuilder(lc.StringEngineType).
WithPipeline([]string{"main"}).
WithStringParser(parser).
WithDefaultEvents(true).
Build()
}package main
import (
"github.com/pt-main/lc"
"github.com/pt-main/lc/byteParsing"
"github.com/pt-main/lc/tooling/bytecode"
)
func main() {
parser := &byteParsing.Parser1{
Config: byteParsing.Parser1Config{
GConfig: bytecode.GenerationConfig{
CommandBytelen: 1,
ArgscountBytelen: 1,
ArglenBytelen: 1,
Endianess: bytecode.LittleEndian,
},
Shifter: bytecode.Shift{},
},
}
_, _ = lc.NewEngineBuilder(lc.ByteEngineType).
WithPipeline([]string{"main"}).
WithByteParser(parser).
WithDefaultEvents(true).
Build()
}Recommended defaults for industrial usage:
- explicit multi-stage pipeline,
- service-level context propagation,
- explicit logger injection,
- controlled scope schema,
- event hooks for metrics/audit.