Show HN: Lamina – A compiler backend that is not LLVM or Cranelift
Show HN (score: 5)Description
Instead of depending on external backends, Lamina provides a complete pipeline from a single SSA based IR directly to the supported target's assembly generation. The IR is readable, also provides a IRBuilder API that is easy to use via programmatic construction.
For better management of the code generation process, in the future, it will use a new pipeline IR -> MIR -> native assembly with the optimization passes.
Key features: - Direct code generation: IR -> assembly/machine code without LLVM/Cranelift - SSA based IR: single assignment form optimized for analysis and optimization passes - MIR based codegen(experimental): new intermediate representation with register allocation and advanced optimizations - IRBuilder API: fluent interface for building modules, functions, blocks, and control flow - Readable IR: easy to debug and lower than high level languages - Zero external backend dependencies: simplified builds and transparent pipeline while being faster to build
Optimization passes (experimental MIR flow only): - Control flow: CFG simplification, jump threading, branch optimization - Loop optimizations: loop fusion, loop invariant code motion, loop unrolling - Code motion: copy propagation, common subexpression elimination, constant folding - Function optimizations: inlining, tail call optimization - Arithmetic: strength reduction, peephole optimizations
Performance: On a 256×256 matrix multiplication benchmark (300 runs), Lamina's experimental MIR-based codegen (which includes all optimization passes) generates code comparable to C/C++/Rust (within 1.8x) and faster than Java, Go, JavaScript, and Python. The experimental MIR based flow's result is much faster than the IR-> Assembly based codegen.
Written in Rust (2024 edition), Current Version 0.0.7. Optional nightly features available for SIMD, atomic placeholders, and experimental targets.
More from Show
Show HN: Swatchify – CLI to get a color palette from an image
Show HN: Swatchify – CLI to get a color palette from an image A fast, cross-platform CLI tool that extracts dominant colors from images using k-means clustering.
Show HN: Wozz – Agentless Kubernetes cost auditor (open source)
Show HN: Wozz – Agentless Kubernetes cost auditor (open source)
Show HN: Zephyr3D – TypeScript WebGPU/WebGL 3D engine with an in‑browser editor
Show HN: Zephyr3D – TypeScript WebGPU/WebGL 3D engine with an in‑browser editor Hi HN,<p>I’ve been working on Zephyr3D, an open-source 3D rendering engine for the modern web, plus a visual editor that runs entirely in the browser.<p>- Written in TypeScript - Supports WebGL/WebGL2/WebGPU - Comes with a visual editor that runs in the browser (no installation required)<p>With the recent updates, a few things might be interesting to people here:<p>Engine & rendering ------------------<p>- WebGL/WebGPU abstraction with a TypeScript API - PBR rendering - Cluster lighting & Shadow Maps - Clipmap-based terrain for large landscapes - Sky Atmosphere & Height-based fog - FFT water system - Temporal anti-aliasing (TAA) - Screen-space motion blur<p>The goal is to make it possible to build reasonably complex 3D experiences that run directly in the browser, without native dependencies.<p>In-browser editor -----------------<p>The editor is a web app built on top of the engine and runs completely in the browser. It currently supports:<p>- Project management - Scene editing - Node-based material blueprints - Animation editing - Script binding and a scheduling system - Prefabs for reusing entities across scenes - Preview and one-click publishing to the web<p>All project data is handled via a virtual file system (VFS) that can plug into different backends (in-memory, IndexedDB, HTTP, ZIP, DataTransfer, etc.), so saving/loading works entirely on the client side.<p>Links -----<p>Homepage: <a href="https://zephyr3d.org" rel="nofollow">https://zephyr3d.org</a> Editor (runs in the browser): <a href="https://zephyr3d.org/editor/" rel="nofollow">https://zephyr3d.org/editor/</a> GitHub: <a href="https://github.com/gavinyork/zephyr3d" rel="nofollow">https://github.com/gavinyork/zephyr3d</a><p>I'd love feedback on:<p>- How the in-browser editor workflow feels (performance, UX, what’s missing) - Whether the VFS approach for project data makes sense for real projects - Any red flags you see in the engine architecture or WebGPU/WebGL abstraction - What would be deal-breakers or must-have features for using this in games, data viz, or other interactive web experiences<p>I’ll be around to answer questions and can go into more detail about the rendering pipeline, the editor internals, or anything else you’re curious about.
Show HN: Parm – Install GitHub releases just like your favorite package manager
Show HN: Parm – Install GitHub releases just like your favorite package manager Hi all, I built a CLI tool that allows you to seamlessly install software from GitHub release assets, similar to how your system's package manager installs software.<p>It works by exploiting common patterns among GitHub releases across different open-source software such as naming conventions and file layouts to fetch proper release assets for your system and then downloading the proper asset onto your machine via the GitHub API. Parm will then extract the files, find the proper binaries, and then add them to your PATH. Parm can also check for updates and uninstall software, and otherwise manages the entire lifecycle of all software installed by Parm.<p>Parm is not meant to replace your system's package manager. It is instead meant as an alternative method to install prebuilt software off of GitHub in a more centralized and simpler way.<p>It's currently in a pre-release stage, and there's a lot of features I want to add. I'm currently working (very slowly) on some new features, so if this sounds interesting to you, check it out! It's completely free and open-source and is currently released for Linux/macOS. I would appreciate any feedback.<p>Link: <a href="https://github.com/yhoundz/parm" rel="nofollow">https://github.com/yhoundz/parm</a>
No other tools from this source yet.