Lama2 icon indicating copy to clipboard operation
Lama2 copied to clipboard

Wasm integration

Open rogueloop opened this issue 9 months ago • 1 comments

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

  1. controller.cli.go

  2. Controller.wasm.go

  3. controller.go

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

rogueloop avatar May 11 '24 05:05 rogueloop

Too many files need an abstract PR description, like

  1. A wasm bin is generated
  2. The bin starts from funcname() from filename.ext
  3. Moves to blah for doing X
  4. 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

lovestaco avatar May 25 '24 08:05 lovestaco