Lama2
Lama2 copied to clipboard
Wasm integration
What type of MR is this? (check all applicable)
- [ x] 🍕 Feature
Web assembly integration for Lama2.
Modifying Golang to add support for building web assembly binary.
Important files to start review from in the order
other major changes :
- makefile
# Build command for normal cli builds
go build -tags=cli -o build/l2 -ldflags "-X main.version=$(git tag --sort=-version:refname | head -n 1) -X main.lamawasm=cli " l2.go
# Build command for wasm builds
GOOS=js GOARCH=wasm go build -o build/l2.wasm -tags=wasm -ldflags "-X main.version=$(git tag --sort=-version:refname | head -n 1) -X main.lamawasm=lamawasm " l2.wasm.go
Too many files need an abstract PR description, like
- A wasm bin is generated
- The bin starts from funcname() from filename.ext
- Moves to blah for doing X
- Moves to blah2 for doing Y
It would be better to write in this way, so that when you're writing documentation you can reuse this and iterate on that.
Plus points if you put it in a mermaid diagram
It'll be more easy for you later on
Because if you do 1 month marketing, you only will forget the flow :D