Repository navigation
Conversation
Resolve imports from an explicit std root, the actual executable's sibling std tree, then the legacy per-user installation. Preserve compatibility validation and fail on an invalid selected tree without silent fallback. Keep install/update destinations unchanged and exercise discovery in package smoke checks and relocated-compiler regressions. Refs wavefnd#928 Signed-off-by: LunaStev <luna@lunastev.org>
Check floating literals at their resolved HIR evaluation width while retaining
contextual f64, explicit conversion order, finite rounding and short-circuit
arithmetic behavior. Add float-only {:.N} output with checked precision,
matching native and WebAssembly rounding, source diagnostics and regressions.
Refs wavefnd#927, wavefnd#929
Signed-off-by: LunaStev <luna@lunastev.org>
Document f32 literal contexts and rounding, fixed fractional output, std lookup precedence, the default O0 optimization level, and explicit O2 usage. Explain the supported --dep sibling-test layout while preserving local import bounds. Refs wavefnd#927, wavefnd#928, wavefnd#929, wavefnd#930, wavefnd#931 Signed-off-by: LunaStev <luna@lunastev.org>
Serialize relocated-compiler test cases to keep writable executable copies from overlapping child process creation. Gate precision execution fixtures with their consumers, and choose an enabled target for frontend diagnostics when the compiler has a restricted LLVM feature set. Refs wavefnd#928, wavefnd#929 Signed-off-by: LunaStev <luna@lunastev.org>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fresh installations and relocated compilers now find the
std/shipped besidewavec, so importing std no longer requires an extra--std-rootflag. Floating literals are range-checked at their resolved HIR width, andprint/printlnsupport fixed fractional float output with{:.N}.1e39before output emission, while preserving contextual f64, finite rounding, signed zero, underflow, explicit conversion order, and arithmetic short-circuiting.-O0and explicit-O2, and a verified--dep=pkg=.layout for siblingsrc/andtests/directories.Motivation
Closes #927 through the documented f32 default/rounding policy and the missing representation-range check. Ordinary finite rounding remains allowed.
Closes #928 by using the std included in the compiler's installation or extracted archive.
Closes #930 through README/help documentation of the existing O0 default and explicit optimization usage. This does not change the default or claim a benchmark speedup.
Closes #931 through its documented-layout alternative: sibling tests can import public source modules with
--dep, without a library entry or re-export. Parent-directory imports remain unsupported.Related to #929: implements the requested float-precision subset
{:.N}. Width, fill, alignment, dynamic precision, and additional radix syntax are outside this PR; existing{x}hexadecimal output remains available.Target and compatibility impact
LLVM remains the default backend, optimization defaults remain O0, and local import containment is unchanged. The Whale dependency and adapter execution scope are unchanged. No dependencies, targets, native ABI contracts, or releases are added or removed.
Fixed precision uses a nonnegative decimal integer in
0..=2147483647; incompatible types, malformed precision, and input precision receive source diagnostics before backend lowering. Existing explicit std-root overrides retain their no-fallback behavior.Validation
Using Rust 1.89.0, LLVM 21.1.8, and Cargo jobs=2:
LLVM_SYS_211_PREFIX=/usr/lib64/llvm21 cargo +1.89 test --offline --locked --jobs 2 --workspace --all-targets: 439 passed across 50 suites. Local socket regressions ran with the required local permission.LLVM_SYS_211_PREFIX=/usr/lib64/llvm21 cargo +1.89 clippy --offline --locked --jobs 2 --workspace --all-targets -- -D warnings.python3 -m unittest tools.test_ci tools.test_release_gates tools.test_release_publish tools.test_windows_package: 68 passed.node tools/test_wasm_host.mjs: 8 passed.cargo +1.89 fmt --all --check, touched Rust function-spacing checks,python3 tools/check_std_policy.py, andgit diff --check.--std-root.CI follow-up validation for the regression tests:
The initial CI run reported four failures in these test harnesses (Linux arm64/riscv64 and Windows amd64/arm64). Remote validation of this follow-up remains pending; local checks do not establish native Windows execution.
Checklist
Signed-off-byline.std/.