Machine requirements
The instruction set, required CPU features, operating system, and object format determine where the code can run.
The package registry and command-line tool for assembly projects.
mov rax, rdicmp rdi, rsicmova rax, rsiret
asm search mathView recordingChange the inputs or step through the function.
The registers hold the inputs and result. Package tests
Requires Linux x86-64 and GNU binutils. Install Asm and host tools.
asm new minimum &&
cd minimum &&
asm add stubbi/math@0.4.0 --target x86_64-linux
Replace src/main.s with the example.
asm lock &&
asm run --locked
.include "stubbi/math/0.4.0/x86_64-linux/src/min.s"
mov edi, 12
mov esi, 37
call asm_u64_min
/*
MIT License
Copyright (c) 2026 ASM contributors
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*/
.intel_syntax noprefix
.include "stubbi/math/0.4.0/x86_64-linux/src/min.s"
.section .text
.global _start
_start:
mov edi, 12
mov esi, 37
call asm_u64_min
cmp rax, 12
jne .Lfailure
mov eax, 1
mov edi, 1
lea rsi, [rip + message]
mov edx, message_end - message
syscall
mov eax, 60
xor edi, edi
syscall
.Lfailure:
mov eax, 60
mov edi, 1
syscall
.section .rodata
message: .ascii "min(12, 37) = 12\n"
message_end:
.section .note.GNU-stack,"",@progbits
THE PACKAGE MODEL
Check the target, calling interface, and build instructions before you reuse a package. Some requirements are stated in its documentation.
The instruction set, required CPU features, operating system, and object format determine where the code can run.
The application binary interface (ABI) defines calls and data layout. Read the package's symbol names, memory ownership, and register use.
Declared tools, pinned inputs, and recorded outputs give you something concrete to reproduce and review.
RELEASE EVIDENCE
Package records show metadata checks, artifact checks, and checks that were not run. Read each result's version, target, scope, and assumptions.
Read the security modelEach release lists its current checks. Hosted proof and analysis services are planned.
Size and SHA-256 checks compare a file with its release record. A matching digest does not establish publisher identity or safety.
Connects an artifact to its source, build process, and publisher identity within a stated policy.
Records what a named tool inspected, the tool version, and its findings.
Records the inputs, target, environment, and observed results of specific tests.
Establish stated mathematical properties within a model and explicit assumptions.
Provides advisory analysis. It does not replace an accountable review or a release gate.
WHY Asm
Software should serve people well and use resources with care. Assembly gives builders direct control over instructions and machine features.
We expect AI to make assembly cheaper to create and maintain. More generated code makes dependable reuse and inspectable evidence more important.
Asm brings assembly projects, packages, targets, and release evidence into a shared workflow. People decide what to build, what to use, and what to trust.
Assembly must earn its place through correct behavior, useful results, and measured total cost.
Read the project motivationAn asmwc experiment measured default counting on a 128 MiB text file. On Apple M3 with macOS 15.6.1, median time was 15.234 ms for optimized assembly and 68.468 ms for native Rust. Each implementation had 24 samples with a warm file cache. The comparison includes algorithm, I/O, and startup differences. Asm checked the published records; we have not reproduced the experiment.
Read the experiment and its limitsBUILT IN THE OPEN
Asm 0.6.0 supports local projects, exact dependencies, and standalone Linux cross builds. Broader resolution and hosted verification remain planned.
A native assembly executable, local project commands, and a format for package records.
Target-specific locks, checked source files, managed executable installs, and reproducible release artifacts.
Authenticated publication, ownership controls, account recovery, and dependency range resolution.
Clients for more hosts, isolated analysis, and scoped proof checks for supported routines.