Skip to content

[mojo] Update the codebase to mojo v1.0.0#260

Open
forfudan wants to merge 3 commits into
mainfrom
dev
Open

[mojo] Update the codebase to mojo v1.0.0#260
forfudan wants to merge 3 commits into
mainfrom
dev

Conversation

@forfudan

Copy link
Copy Markdown
Owner

No description provided.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates Decimo’s Mojo sources and Pixi environment configuration to track Mojo nightly, adapting code to recent language/stdlib API changes (borrowing qualifiers, unsafe memory routines, and Span API updates).

Changes:

  • Retarget Pixi workspace to Mojo nightly (channel + dependency changes) and refresh lockfile.
  • Update core numeric types/algorithms to new Mojo borrowing qualifiers (imm) and stdlib memory APIs (unsafe_memcpy, unsafe_memset_zero, pointer offset access).
  • Minor TOML/CLI adjustments to align with nightly semantics (e.g., explicit .copy() in TOML getters, in-place string resize in CLI IO).

Reviewed changes

Copilot reviewed 22 out of 23 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/decimo/toml/parser.mojo Updates TOML value container typing (Self), lifecycle traits, and returns copies from getters under new ownership rules.
src/decimo/str.mojo Adjusts closure capture qualifiers from read to imm for nightly borrowing rules.
src/decimo/decimal128/special.mojo Adds explicit Decimal128 import for nightly name/type resolution.
src/decimo/decimal128/exponential.mojo Adds explicit Decimal128 import for nightly name/type resolution.
src/decimo/decimal128/decimal128.mojo Updates Span import and field names (unsafe_ptr) to match nightly stdlib changes.
src/decimo/biguint/exponential.mojo Switches to unsafe_memset_zero per nightly stdlib API.
src/decimo/biguint/biguint.mojo Switches to unsafe_memcpy/unsafe_offset and updates local bindings per nightly syntax.
src/decimo/biguint/arithmetics.mojo Broad imm migration + memory API updates; resize API changes (length/fill).
src/decimo/bigint10/bigint10.mojo Updates ref binding syntax for nightly parsing rules.
src/decimo/bigint/bitwise.mojo Replaces read with imm for in-place bitwise helpers.
src/decimo/bigint/bigint.mojo Updates memcpy usage and pointer indexing to nightly pointer/offset conventions.
src/decimo/bigint/arithmetics.mojo Updates memory calls and borrowing qualifiers to nightly conventions.
src/decimo/bigdecimal/trigonometric.mojo Adds explicit BigUInt import needed under nightly.
src/decimo/bigdecimal/rounding.mojo Adds explicit BigUInt import needed under nightly.
src/decimo/bigdecimal/exponential.mojo Reorders/imports BigUInt and updates ref binding syntax for nightly.
src/decimo/bigdecimal/constants.mojo Adds explicit BigUInt import needed under nightly.
src/decimo/bigdecimal/bigdecimal.mojo Adds explicit BigUInt import and updates ref binding syntax for nightly.
src/decimo/bigdecimal/arithmetics.mojo Adds explicit BigUInt/BigDecimal imports needed under nightly.
src/cli/calculator/io.mojo Replaces substring rebuild with in-place String.resize when stripping trailing \r.
pixi.toml Adds nightly channel; loosens mojo constraint; comments out argmojo dependency.
pixi.lock Lockfile refresh reflecting nightly channel and updated package set.
benches/bigint/mojo/bench.mojo Updates bench signatures/comments from read to imm.
benches/bigdecimal/mojo/bench.mojo Updates bench signatures/comments from read to imm.
Comments suppressed due to low confidence (2)

src/decimo/biguint/arithmetics.mojo:2759

  • Typo in comment: "imm" is a borrowing keyword, but here the sentence is about reading from the source list; this should say "read".
        # written before src[i+1] is imm.

src/decimo/biguint/arithmetics.mojo:2884

  • Typo in comment: "imm" is a borrowing keyword, but this sentence is describing that the source element is read after the destination write; it should say "read".
    # before src[i+1] is imm.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread pixi.toml
Comment on lines +12 to +13
# argmojo = ">=0.7,<0.8" # CLI argument parsing for the Decimo calculator
mojo = "*" # Mojo language compiler and runtime
Comment thread src/decimo/biguint/arithmetics.mojo Outdated
@forfudan forfudan changed the title [mojo] Update the codebase to Mojo nightly [mojo] Update the codebase to mojo v1.0.0 Jul 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants