{"id":26590535,"url":"https://github.com/emcfarlane/laze","last_synced_at":"2025-03-23T13:52:39.029Z","repository":{"id":48481891,"uuid":"381330940","full_name":"emcfarlane/laze","owner":"emcfarlane","description":"A simple build system","archived":false,"fork":false,"pushed_at":"2021-07-23T12:17:19.000Z","size":77,"stargazers_count":1,"open_issues_count":5,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-06-21T03:14:53.231Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/emcfarlane.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-06-29T10:49:53.000Z","updated_at":"2021-07-23T20:19:19.000Z","dependencies_parsed_at":"2022-09-14T08:40:41.529Z","dependency_job_id":null,"html_url":"https://github.com/emcfarlane/laze","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emcfarlane%2Flaze","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emcfarlane%2Flaze/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emcfarlane%2Flaze/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emcfarlane%2Flaze/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/emcfarlane","download_url":"https://codeload.github.com/emcfarlane/laze/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245111929,"owners_count":20562511,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-03-23T13:52:38.538Z","updated_at":"2025-03-23T13:52:39.020Z","avatar_url":"https://github.com/emcfarlane.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# [WIP] laze\n\n{fast,~~correct~~,simple} - Choose two\n\n## Why laze?\n\nLaze is a simple build tool with skylark configuration.\nSimilar to bazel it builds an action graph to exectute.\nUnlike bazel it doesn't focus on the correctness of builds.\nThis is a tradeoff from the complexity that adds.\nInstead it hands off the complexity to the tools.\nThis plays nicely with mordern tooling and avoids reinventing the compiliers\nfor each language.\nHowever because of this it will always be slightly janky.\nSo use at your own risk.\n\n\n# Install\n\n```\ngo get install github.com/emcfarlane/laze/cmd/laze\n```\n\n# Docs \n\n## Labels\n\nLabels are what laze uses to identify resources. \nUnder the hood labels are represented as URLs.\nRelative paths are accepted too.\n\n- `path/to/file.txt` : Relative path to file from the directory.\n- `../sibling/file.txt` : Relative path to folder in parent directory.\n- `file://path/from/root\" : Local path from command root.\n- `file:///usr/bin/cat\" : Absolute path in local filesystem.\n- `https://remote.com/source.py` : Remote file over http.\n\n###  Label Query Parameters\n\nLabel targets can take query parameters to override target fields.\n\n```\ngo(\n    name = \"hello\",\n)\n\ntar(\n    name = \"helloc.tar.gz\",\n    srcs = [\"file://helloc?goarch=amd64\u0026goos=linux\"],\n    package_dir = \"/usr/bin\",\n    strip_prefix = \"\",\n)\n\ncontainer_image(\n    name = \"helloc.tar\",\n    base = \"distroless.tar\",\n    entrypoint = [\"/usr/bin/helloc\"],\n    krioritized_files = [\"/usr/bin/hello\"],  # Supports estargz.\n    tar = \"../packaging/helloc.tar.gz\",\n)\n```\n\nFor instance with container images the binaries will always want to be targeted \nto the architecture of the containers runtime (usually linux).\nBut on the host we will want to execute the binaries under the host arch.\nTherefore we can use the host as the default and override to the platform with\nquery parameters. Avoiding the need to specify build flags on every invocation.\n\nTODO: Commands should be able to depend on any type of action.\nThis would allow an action to depend on an action of a different type.\nLike a container push depending on all tests passing.\n\n### Label Protocols\n\nSupported protocols:\n- `https://`\nTODO(edward): add dynamic support for protocols.\n\n\n## Builtins\n\n### go\n\nGo builds!\n\n```\ngo(\n  name = \"binary\"\n)\n```\n\n[Example](testdata/go/BUILD.star)\n\n#### cgo\n\nCGO is support through `zig`!\n```\ngo(\n  name = \"mycmd\",\n  cgo = True,\n)\n```\n\n[Example](testdata/cgo/BUILD.star)\n\n### container\n\nContainers are supported with [github.com/google/go-containerregistry](github.com/google/go-containerregistry)\n\n[Example](testdata/container/BUILD.star)\n\n### proto\n\nProtobuffers are supported with native `protoc`.\n\n### TODO\n\nIf you have a usecase for laze and would like support adding please file an issue!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Femcfarlane%2Flaze","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Femcfarlane%2Flaze","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Femcfarlane%2Flaze/lists"}