惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

博客园_首页
PCI Perspectives
PCI Perspectives
T
Tailwind CSS Blog
月光博客
月光博客
Apple Machine Learning Research
Apple Machine Learning Research
大猫的无限游戏
大猫的无限游戏
V
V2EX
D
Docker
P
Proofpoint News Feed
阮一峰的网络日志
阮一峰的网络日志
博客园 - 司徒正美
酷 壳 – CoolShell
酷 壳 – CoolShell
云风的 BLOG
云风的 BLOG
H
Help Net Security
The Register - Security
The Register - Security
宝玉的分享
宝玉的分享
C
Check Point Blog
T
Threatpost
The GitHub Blog
The GitHub Blog
P
Privacy International News Feed
G
Google Developers Blog
博客园 - Franky
爱范儿
爱范儿
T
Tor Project blog
博客园 - 聂微东
Google DeepMind News
Google DeepMind News
G
GRAHAM CLULEY
雷峰网
雷峰网
Cyberwarzone
Cyberwarzone
人人都是产品经理
人人都是产品经理
C
Cybersecurity and Infrastructure Security Agency CISA
Vercel News
Vercel News
Scott Helme
Scott Helme
aimingoo的专栏
aimingoo的专栏
Martin Fowler
Martin Fowler
MyScale Blog
MyScale Blog
Last Week in AI
Last Week in AI
GbyAI
GbyAI
Microsoft Azure Blog
Microsoft Azure Blog
腾讯CDC
K
Kaspersky official blog
D
Darknet – Hacking Tools, Hacker News & Cyber Security
Project Zero
Project Zero
F
Fortinet All Blogs
AWS News Blog
AWS News Blog
The Cloudflare Blog
C
CERT Recently Published Vulnerability Notes
I
InfoQ
Spread Privacy
Spread Privacy
T
Tenable Blog

Show HN

GitHub - villagesql/villagesql-skills: Agent skills for VillageSQL - gemini-cli-extension; claude-code-plugin GitHub - flightdeckhq/flightdeck: Observability and control plane for AI agents. CSP Radar GitHub - Light-Heart-Labs/DreamServer: Turn your PC, Mac, or Linux box into an AI server. LLM inference, chat UI, voice, agents, workflows, RAG, and image generation. GitHub - Diplomat-ai/diplomat-agent-ts: What can your TypeScript AI agent do to the real world? Scan your code. See which tool calls have zero checks Code Block Selector - Visual Studio Marketplace Prometheus dependency graph — interactive showcase | Riftmap Show HN: I made a vi-like modal keyboard plugin for Figma GitHub - run-llama/liteparse: A fast, helpful, and open-source document parser GitHub - dalemyers/Roar: A macOS CLI tool for notifications GitHub - district-solutions/open-agent-tools-coder: Enables small-to-large self-hosted ai models to use local source code when running tool-calling agentic workloads. We actively data mine 20,900+ (2+ TB) popular github repos using large and small ai models to create reuseable: json, markdown and parquet files for local-first tool-calling models. GitHub - progapandist/stripeek: A local TUI proxy for real-time Stripe API debugging, built for navigating complex payloads fast. GitHub - sir1st/hermes-desktop: All-in-one cross-platform desktop app for Hermes Agent — bundles Python + hermes-agent + hermes-web-ui GitHub - astefanutti/shaderbang: Shebang for Shaders Show HN: Generate Claude Code Workflows using Spec Driven Development approach GitHub - nixys/nxs-universal-chart: The Helm chart you can use to install any of your applications into Kubernetes/OpenShift Show HN: AI agents for UK GDAD PCF roles and their skills The Two Pillars: Mixer Mode and Meta-Software in the Reorganization of Software Work After AI GitHub - JaiCode08/teleport-env What 1,000+ Harness Experiments Taught Me About Self-Improving Agents Show HN: Liiists, a Markdown-first, iOS and CLI list app SwiperTab – Get this Extension for 🦊 Firefox (en-US) GitHub - kouhxp/fftext: Summarize, explain, fact-check, or translate any text, URL, or file. No GPU. No cloud. One command GitHub - sweetpad-dev/sweetpad: Develop Swift/iOS projects using VSCode GitHub - dogmaticdev/IRON: IRON a.k.a. Intermediate Representation Object Notation is a Interpreter/Database that is used to create Programming Languages. GitHub - sjhalani7/vaen: Package your AI coding harness into a portable .agent file, and share it across repos, teams, & the community without ever having to copy-paste instructions, skills, MCP config, or secrets. Show HN: Gandalf the Grader Show HN: Citadeld – replay any CI failure locally from a single file GitHub - tdortman/cuSBF: High-Performance GPU Super Bloom Filter coral-ai/claude-code-token-xray at main · Coral-Bricks-AI/coral-ai GitHub - ulyssestenn/funes: Funes is a Git-based framework for LLM-managed knowledge work: an AI Librarian ingests raw sources, builds an interlinked Markdown knowledge base, and uses it to produce cited reports, analyses, and other outputs. GitHub - ThatXliner/gah: Git Add Hunk, built for agents to use GitHub - harmont-dev/harmont-cli: Command-line client for the Harmont CI platform GitHub - brooksmcmillin/mcp-authflow: OAuth 2.0 Authorization Server framework for MCP servers GitHub - javaid-codes/audit-supply-chain-agents GitHub - amorey/gochan: A small library of common channel architectures for Go, inspired by Rust GitHub - arifozgun/OpenGem: Free, Open-Source AI API Gateway with Gemini, OpenAI & Anthropic Compatibility in 1 file GitHub - Pranesh950/BioPetals: 🌸 Run BIOxAI models at home, BitTorrent-style. Fine-tuning and inference up to 10x faster than offloading GitHub - cnguyen14/bounty-doctor: Diagnose a GitHub bounty issue before you waste hours: detects honeypot scam repos, AI-bot attempt swarms, and stale contests. Show HN: CoreMCP – MCP Server for On-Prem DBs Show HN: KittyHTML – Render HTML/CSS as an inline image in your terminal GitHub - bingud/filemat: Web-based file manager Show HN: TruthLens – Free multi-signal deepfake image detector GitHub - apexlocal-jz/claude-usage-tray: Windows system-tray app showing your Claude Code rate-limit usage at a glance. Zero deps, ~300 lines of PowerShell. Cross-IDE (works regardless of VS Code, Cursor, plain terminal). Release v0.1.2.1 · kouhxp/yapsnap GitHub - noopolis/moltnet: Self-hostable chat network for AI agents. Pre-built bridges for Claude Code, Codex, and the Claws. Rooms, DMs, history. No Slack bots, no Matrix, no glue code. GitHub - tamerh/enju: Coordinating Humans, AI Agents, and Compute as Peers on a Shared Workflow Graph Show HN: Continuity-auth – Respect-weighted rate limits for the open web GitHub - luml-ai/luml: AI lifecycle platform where engineers and agents track experiments, train models, and ship to production. GitHub - mrdanielcasper/CoreTex: A UNIX-inspired, biomimetic, flat-file AI harness and knowledge engine. GitHub - clemg/pierre-github: Pierre's diffs.com and trees.software for Github GitHub - lyriks-io/unspaghettit: Behavior-driven AI development without prompt spaghetti. GitHub - sofumel/claude-handoff-revive: Resume Claude Code work after rate/usage/context limits without replaying the prior transcript. Auto-saves at 90%/95% usage. Plugin-installable, 10 languages. GitHub - dotexorg/saferpc: Typed, end-to-end encrypted RPC over any bidirectional channel. GitHub - BeeZeeAgent/beezee: Agent harness orchestration Legato Next.js Boilerplate for Internal Tools · CoreUI GitHub - clark-labs-inc/clark-hash: Clark Hash, 32x smaller searchable sketches for embeddings GitHub - ZeroPointRepo/youtube-mcp: The fastest YouTube transcript + YouTube search MCP for AI agents. Try for free. Typing Mastery — climb toward 100+ WPM, deliberately GitHub - Andebugulin/Awareen GitHub - fayzan123/claude-workflow-composer: Visual desktop app for composing multi-agent coding workflows. Drag agents, attach skills and MCPs, wire handoffs, export to .claude/ GitHub - harshaneel/humanize: Best static AI text humanizer. Two research-grounded skills that work in any LLM (Claude, ChatGPT, Gemini, Codex): humanize beats perplexity-based detectors, ai-check produces forensic scoring with evidence-quoted flags. Nine levers, 50+ peer-reviewed sources, 2024-2026 detection literature. GitHub - StackOneHQ/stack-nudge GitHub - nodes-app/swift-markdown-engine: A native AppKit Markdown editor for macOS, built on TextKit 2 and bridged to SwiftUI. We hardened an LLM agent. Each defense we added made it more exploitable. GitHub - alkait/WhatsKept: Agent-queryable WhatsApp history from an iOS backup — a single Go binary. GitHub - octelium/cordium: Open-source, general-purpose sandbox platform for devs and AI agents that provides identity-based secure access to infrastructure without credentials. WAR.GOV/UFO Microfilm5 GitHub - scosman/videowright: Build animated explainer videos with your coding agent GitHub - dipankar/dscode: The code editor you can take apart. GitHub - zoharbabin/web-researcher-mcp: MCP server (Go) for AI assistants: web search, content extraction, academic/patent/news research. Multi-provider routing, 4-tier scraping, search lenses. Works with Claude, Cursor, and any MCP client. GitHub - ruvnet/RuView: π RuView turns commodity WiFi signals into real-time spatial intelligence, vital sign monitoring, and presence detection — all without a single pixel of video. GitHub - scanaislop/aislop: Catch the slop AI coding agents leave in your code: narrative comments, swallowed exceptions, as-any casts, dead code, oversized functions. 50+ rules across 7 languages (TypeScript, JavaScript, Python, Go, Rust, Ruby, PHP). Sub-second, deterministic, no LLM at runtime. MIT-licensed. GitHub - kouhxp/cheap-im: CPU-only voice agent approximating Thinking Machines' Interaction Models demo GitHub - unprovable/OrchidMantis: Orchid Mantis — standalone framework for Zero-Knowledge Proofs of eXploit (ZKPoX). GitHub - MarcellM01/TinySearch: Shrink the web for your local LLMs! GitHub - TangibleResearch/Halgorithem: A Algo designed to detect AI Hallucitions GitHub - DO-SAY-GO/freelang: I love freelang GitHub - CarpseDeam/Aura-IDE: An AI coding harness that shaped itself - Planner/Worker agents, repo awareness, surgical edits, validation, recovery, and safe diff approvals. GitHub - chojs23/concord: A feature-rich TUI client for Discord GitHub - tommyjepsen/awesome-ux-skills: UX & AI Product designs skills you can use today in Claude Code GitHub - aerf-spec/aerf: Agent Evidence Receipt Format (AERF) — an open specification for tamper-evident, independently verifiable records of AI agent actions. GitHub - kklimuk/docx-cli: CLI for AI agents (Claude, Codex) to read, edit, and comment on .docx files with full format fidelity. GitHub - Jwrede/tokentoll: Catch LLM cost changes in code review. Infracost for LLM spend. GitHub - samchon/ttsc: A `typescript-go` toolchain for compiler-powered plugins and type-safe execution + 500x faster lint integrated into compiler GitHub - Higangssh/homebutler: 🏠 Manage your homelab from chat. Single binary, zero dependencies. GitHub - olalie/tapmap: See where your computer connects and what stands out on a live world map. GitHub - matisiekpl/neond: DX-focused control plane for Postgres dedicated to non-critical workloads. Your postgres:latest replacement 🐘 GitHub - Diplomat-ai/diplomat-agent: What can your AI agent do to the real world? Scan your code. See which tool calls have zero checks GitHub - Bajusz15/beacon: Open-source agent for secure remote access, monitoring, and deploys across home-lab and self-hosted machines like Raspberry Pi, N100, or any Linux server. Open web based TTY or tunnel Home Assistant and other local services securely without opening ports. BigTech AI News - Chrome 应用商店 GitHub - vinhnx/VTCode: VT Code is an open-source coding agent with LLM-native code understanding and robust shell safety. Supports multiple LLM providers with automatic failover and efficient context management. GitHub - michaelaz774/decision-engine: A decision operating system for startup founders, powered by Claude Code. Synthesizes wisdom from 25+ legendary founders and investors into interactive AI-driven decision frameworks. GitHub - Chrilleweb/dotenv-diff: Validate environment variable usage in your codebase GitHub - Lumen-Labs/brainapi2: BrainAPI is a knowledge graph–powered AI memory layer that transforms unstructured data into structured knowledge, enabling intelligent search, recommendations, and contextual memory for AI agents and applications. GitHub - familiar-software/familiar: Let AI watch you work. Familiar lets your AI update its memory, skills, and knowledge by watching your screen. GitHub - skorotkiewicz/rudo: A small, elegant dock for Wayland GitHub - muxshed/shed: One stream in, or many. Every destination, simultaneously. No cloud middleman, no per-channel fees, no limits. make sidebar/address bar rounded corner toggleable
GitHub - momiji-rs/sasso: A pure-Rust SCSS to CSS compiler (a dart-sass alternative). Zero dependencies, wasm-friendly, lib + CLI.
linyiru · 2026-06-28 · via Show HN

crates.io docs.rs CI CodSpeed sass-spec dart-sass runtime deps license

A pure-Rust SCSS → CSS compiler — a from-scratch dart-sass alternative. Zero runtime dependencies, wasm-friendly, usable as a library and a CLI, and designed to match current dart-sass byte-for-byte on the subset it implements.

Status: v0.x, maturing fast. Compiles real-world SCSS and indented .sass byte-identically to dart-sass 1.101, and passes 100% of the attempted official sass-spec suite (13,896 / 13,896, zero failures) — tracked as a ratchet (see Conformance for exactly what that denominator means). What remains is real-world breadth and hardening, not spec coverage.

Why another Sass compiler?

grass is the incumbent Rust implementation and a strong one (it compiles Bootstrap/Bulma byte-accurately and is ~2× faster than dart-sass). But it is pinned to dart-sass 1.54.3 (mid-2022) and predates the CSS Color Level 4 overhaul, so it diverges from current dart-sass on, e.g., fractional color channels (rgb(63.75, 127.5, 191.25) vs rounded hex) and emits hex where dart-sass now keeps rgb()/hsl() forms. sasso targets current dart-sass exactly, with a span-first parser, a modern color model, and a zero-dependency, sandbox-friendly core. See docs/GRASS_LANDSCAPE.md for the full analysis.

Features (this slice)

  • $variables, lexical scoping, !default, !global
  • Nesting, the & parent selector (with selector-list multiplication), and combinator normalization (>, +, ~)
  • #{} interpolation in selectors, property names and values
  • // (stripped) and /* */ (preserved) comments
  • Numbers with units and unit arithmetic ($pad * 2 → 16px)
  • A full color model with fractional channels + author-spelling preservation (red, #336699, rgb()/hsl() round-trip unchanged)
  • Color functions: rgb/rgba/hsl/hsla/mix/lighten/darken/ percentage (+ red/green/blue/alpha)
  • @import partial inlining through a pluggable Importer (CSS imports pass through)
  • expanded and compressed output styles
  • Source maps (v3) — byte-exact to dart-sass 1.101, on the library (compile_with_source_map), the CLI (--source-map), and wasm (compile(scss, { sourceMap: true }))
  • Verbatim preservation of CSS functions it doesn't own (calc, var, clamp, translateX, …)

Since this slice was written the ratchet has added a great deal more — @mixin/@function, control flow (@if/@each/@for/@while), @extend and %placeholders, a calc() engine, the CSS unit system + math functions, full CSS Color 4 color spaces (oklch/lab/color()…), structured @media/@supports, maps, the @use/@forward module system (built-in sass:* modules + user files), and the indented .sass syntax. The compiler now passes 100% of the attempted sass-spec suite (13,896 / 13,896, zero failures) byte-for-byte against dart-sass 1.101 — 11,405 byte-exact CSS outputs plus 2,491 error specs it correctly rejects (see Conformance).

Install

CLI — prebuilt binaries. Every release ships static binaries for Linux (gnu + musl), macOS and Windows (x86_64 / aarch64), built with cargo-dist. Grab one from the Releases page, or:

$ curl -fsSL https://github.com/momiji-rs/sasso/releases/latest/download/sasso-installer.sh | sh   # Linux/macOS
$ cargo binstall sasso        # fetch the prebuilt binary
$ cargo install sasso         # build from source (needs a Rust toolchain)

Library — crates.io.

WebAssembly — npm. A tiny, dependency-free wasm build that mirrors the dart-sass modern JS API, so it's a drop-in for the sass npm package in build tools (no wasm-bindgen, no native add-ons):

import { compileString } from "sasso";
compileString("a { color: #ffffff }", { style: "compressed" }).css; // a{color:#fff}

Works as the sass implementation in webpack/sass-loader (implementation: require("sasso"), api: "modern") and Vite (alias "sass": "npm:sasso").

Library usage

use sasso::{compile, Options, OutputStyle};

let scss = "$c: #336699; .a { color: $c; &:hover { color: lighten($c, 10%); } }";
let css = compile(scss, &Options::default()).unwrap();
assert!(css.contains("a:hover"));

// Minified:
let min = compile(scss, &Options::default().with_style(OutputStyle::Compressed)).unwrap();

@import resolution is controlled by an Importer you supply, so file access stays on your side of any sandbox:

use sasso::{compile, Importer, Options};

struct MyFs;
impl Importer for MyFs {
    fn resolve(&self, path: &str) -> Option<String> {
        std::fs::read_to_string(format!("scss/_{path}.scss")).ok()
    }
}
let css = compile("@import \"base\";", &Options::default().with_importer(&MyFs)).unwrap();

A ready-made FsImporter is provided for standalone/CLI use.

CLI usage

$ cargo install --path .            # installs the `sasso` binary
$ sasso input.scss              # CSS to stdout (expanded)
$ sasso --style=compressed input.scss
$ sasso -I scss/ main.scss      # add @import load paths
$ echo '.a{color:red}' | sasso --stdin

Conformance

The official sass-spec suite is the parity oracle. The harness in spec/ runs the compiler against every spec case and reports a pass rate; we ratchet it upward over time.

Metric Value
sass-spec commit 1b03109a (dart-sass 1.101.0)
Total cases 13,904
Attempted (excl. 8 dart-sass :todo) 13,896
Passing 13,896 — 100% of attempted · 0 failures (99.94% of all 13,904)
↳ byte-exact CSS output 11,405
↳ error specs correctly rejected 2,491

Passing = byte-exact CSS output match plus error specs the compiler correctly rejects — the standard sass-spec conformance metric (the harness checks that an error spec errors; the error message is tracked separately as a non-gating metric). The 8 excluded cases are tagged :todo for dart-sass itself upstream — dart-sass doesn't pass them either; sasso matches dart-sass's actual behaviour on all 8 regardless.

Strict input validation, too. Matching dart-sass means rejecting what dart-sass rejects, not just reproducing its output. sasso errors — rather than silently accepting — on an invalid hex literal (#00000), out-of-grammar rgb()/hsl() arguments, a duplicate @mixin/@function parameter, a misplaced @content/@extend, a style rule or declaration inside a @function body, a malformed :nth-child() / empty :not() selector, a bad @charset or @at-root (…) query, and more — each with dart-sass's exact message.

Run it yourself:

$ spec/fetch.sh                                      # clone the suite
$ cargo build --release
$ SASS_BIN=target/release/sasso python3 spec/run_spec.py

Performance

sasso is a native, in-process library — no subprocess, no Node, no Dart VM — so startup is effectively free, which dominates when a build compiles many files. On an Apple M2 Max it is the fastest of the three engines measured, beating dart-sass by 19–30× end-to-end and leading grass (the incumbent Rust compiler) by ~2.3–2.9×:

Axis sasso grass dart-sass (bin) npx sass
Startup² 1.8 ms 1.8 ms 139 ms 495 ms
Cold single large file 11.7 ms 26.5 ms 354 ms 710 ms
Batch (40 files, 1 process) 49.0 ms 136 ms 916 ms
Pure compile (startup removed) 7.4 ms 21.3 ms ~216 ms¹

¹ derived (cold − startup) — dart-sass has no in-process loop mode. So sasso is ~29× faster than dart-sass on pure compute, ~30× on a cold single file, and ~77× on startup; vs grass it is ~2.3× cold / ~2.8× batch / ~2.9× pure.

² Startup compiles a 1-rule file, so it sits at the OS process-spawn floor — sasso and grass measure identically (1.8 ms) here (the mean is dominated by scheduler jitter at this sub-2 ms scale). The native library and wasm builds remove process startup entirely. A scoped bump-arena allocator (one audited unsafe module, Miri- and AddressSanitizer-verified; the rest of the library stays unsafe-free) gives a further ~1.5× by turning each compile's allocations into a pointer bump freed wholesale at the end. Composite values (strings, lists, maps) are reference-counted, so reading a $variable is an O(1) refcount bump, not a deep copy — on a large list passed through a call chain without mutation this cuts both instructions (~7×) and peak memory (~13×). A round of evaluator allocation trimming — skipping the per-rule selector clone when nothing extends it, iterating @each over the list's shared handle, and dropping redundant per-declaration copies — shaves a further ~2.8% off pure compile on representative stylesheets (measured by instructions-retired, since the win is below wall-clock jitter at this ms scale; byte-identical output). Full methodology, per-file numbers and the correctness diff are in bench/three_way.md; run it yourself with cd bench && RUNS=12 WARMUP=3 LOOP_N=200 bash scripts/run_bench.sh.

WebAssembly

Because the library is zero-dependency and pure std, it compiles to wasm32-unknown-unknown and wasm32-wasip1 out of the box (built in CI). The deployable .wasm cdylib ships in two variants, published to npm as sasso:

Variant Build Over the wire Compile (large, in Node)³
size (default) opt-level = "z" + LTO + panic = "abort" + strip + wasm-opt -Oz ~854 KB / ~356 KB gzip ~27 ms
speed (sasso/speed) opt-level = 3 + wasm-opt -O3 ~1.84 MB / ~637 KB gzip ~12 ms

³ in-process compile of the same large file, Node 22 (best-of-N). The wasm tax over native sasso (7.7 ms) is ~1.5× for the speed build and ~3.5× for the size build; the wasm build runs without the bump arena. Even so the speed build (~12 ms) beats native grass (21 ms) and every dart-sass form a Node toolchain can run.

A whole modern Sass compiler — @use/@forward, @extend, the calc engine, CSS Color 4 — in a few hundred KB gzipped, far smaller than shipping the dart-sass compiler as JavaScript. A browser playground is tracked in the issues.

Language bindings

sasso ships as a Rust crate and is usable from other languages too. First-party packages are released by this project and pin a published sasso crate version; community bindings are maintained in their own repos.

Language Package Maintained by How
Rust sasso (crates.io) First-party the core library — see Library usage above
JavaScript / wasm sasso (npm) First-party the in-repo wasm/ cdylib — see WebAssembly above
Ruby sasso (RubyGems) First-party momiji-rs/sasso-ruby — an in-process native extension (magnus + rb-sys) around this crate
Python sasso (PyPI) First-party momiji-rs/sasso-pythonctypes over the C ABI; one prebuilt wheel per platform, no build step
Go sasso-go (go get) First-party momiji-rs/sasso-gopure Go, no cgo: embeds the wasm build and runs it with wazero, so CGO_ENABLED=0 and cross-compilation just work. String-in/CSS-out (for file-based importers use the C ABI via cgo, below)
PHP shyim/php-sasso (PIE / pecl) Community (@shyim) an ext-php-rs extension (Sasso\Compiler) wrapping this crate in-process; prebuilt for PHP 8.2–8.5 (Linux glibc/musl, macOS)

Ruby framework integrations build on that gem — drop-in Sass for your stack, compiled in-process (no Node, no Dart, no subprocess) and byte-for-byte identical to dart-sass:

Framework Gem Repo
Rails (Propshaft + Sprockets) sasso-rails momiji-rs/sasso-rails
Bridgetown bridgetown-sasso momiji-rs/bridgetown-sasso
Hanami (2.1+) hanami-sasso momiji-rs/hanami-sasso

Each compiles Sass without a Node toolchain — typically ~6–7× faster per compile than the Node sass default (and far faster cold, with no process spawn).

C ABI — use sasso from any language

Beyond the packages above, sasso ships a C ABI (ffi/) so any language with a C FFI can drive the compiler in-process. Each release attaches a per-target sasso-<version>-<target>-c-api.tar.xz (.zip on Windows) containing the prebuilt library and the header — the universal substrate every binding sits on:

include/sasso.h
lib/  libsasso.a            # static — link it for a self-contained binary, no runtime dep
      libsasso.so|.dylib    # dynamic (Windows: sasso.dll + sasso.dll.lib + sasso.lib)

The ABI is two owned calls plus an optional importer callback — see ffi/include/sasso.h, the contract notes there, and runnable bindings for 8 languages under ffi/examples/ (C, Go, Ruby, Swift, Deno, Bun, LuaJIT, C#).

From Go

Statically link libsasso.a via cgo for a single self-contained binary (no CGO_ENABLED=0, but no runtime dependency either):

package main

/*
#cgo CFLAGS: -I./sasso-c-api/include
#cgo LDFLAGS: ./sasso-c-api/lib/libsasso.a
#include <stdlib.h>
#include "sasso.h"
*/
import "C"
import (
	"fmt"
	"unsafe"
)

func main() {
	src := ".a { .b { color: #336699 } }"
	cs := C.CString(src)
	defer C.free(unsafe.Pointer(cs))
	r := C.sasso_compile(cs, C.size_t(len(src)), nil)
	defer C.sasso_result_free(r)
	if r.ok == 0 {
		panic(C.GoString(r.error))
	}
	fmt.Print(C.GoStringN(r.css, C.int(r.css_len)))
}

A fuller cgo binding — options, errors, and a custom importer — is in ffi/examples/go/. Prefer no cgo? The first-party sasso-go package is ready-made: go get it and it embeds the wasm build and runs it with wazero, keeping CGO_ENABLED=0 and trivial cross-compilation (string-in/CSS-out; use the cgo path above when you need file-based importers). Or dlopen the dynamic lib at runtime with purego.

Testing & coverage

$ cargo test                                  # unit + integration + doctests (offline)
$ SASSO_PARITY=1 cargo test --test parity # live diff vs dart-sass (needs `npx sass`)
$ cargo llvm-cov --workspace                  # coverage report
$ cargo clippy --all-targets -- -D warnings
$ cargo fmt --check

Changelog

Notable changes are recorded in CHANGELOG.md.

Code of Conduct

As a Sass implementation, sasso adopts the Sass Community Guidelines — see CODE_OF_CONDUCT.md.

License

Licensed under either of Apache-2.0 or MIT at your option.