Exact integers
Useint for arbitrary-precision integer values. Use an explicit fixed-width
integer type only when a data boundary requires that representation.
The former separate bigint spelling and its dedicated diagnostics are not
supported.
Standard library names
Use the names in the compiled public API. Important changes include:- Use
math.fabs,math.pow, and the built-inmin,max, andround. - Use
random.randint,random.random, andrandom.uniform. - Use
platform.system,platform.machine,platform.node,platform.release,platform.version, andplatform.processor. - Use
time.time,time.strftime,sys.argv,sys.exit, and the documentedsifr.envnames. - Use
json.loads,json.dumps,tomllib.loads,fnmatch.filter,html.escape, andhtml.unescape. - Use
calendar.isleap,calendar.weekday,calendar.monthrange,url.parse, andurl.build. - Use first-class
bytesmethods and bytes-native hashing. Encode text before hashing it. - Use first-class
set[T]operations.heapqandbisectnow mutate their input collections.
_sifr.* implementation names are
not public imports.
Method receivers
Receiver spelling is explicit:
The compiler does not infer receiver mutability from the method body.
Packages and source layout
Use one optional[source].root value. It defaults to src. The [source]
table does not accept other fields.
Do not use multiple source roots, manifest export lists, or Sifr manifest
binary tables. Declare library exports in src/__init__.sifr. Put applications
in src/main.sifr or src/bin/*.sifr.
Package import resolution preserves unresolved, ambiguous, access-error, and
fatal results. Tools must not collapse these results into an optional path.
Installation layout
A managed standalone installation uses one relationship:$HOME/.sifr. Flat binary and receipt layouts are not
managed installations.
Diagnostics and verification
Import diagnostics use the currentSIFR-IMPORT-* codes. Removed workspace
codes and migration-only replacement messages are not emitted.
Verification profiles use schema version 2 and structured result JSON. Passing
end-to-end fixtures use Sifr assert statements for runtime expectations.
Compiler service contracts
Compiler services receive a source provider or use a capturedWorkspaceSession. Lower layers do not open disk-backed projects through
paired convenience wrappers.
Code generation uses structured Rust types. Unsupported source types produce a
compiler diagnostic instead of a string-rendered Rust type fallback.
