Skip to content

feat: support native field element type #1621

@DavePearce

Description

@DavePearce

The goal here is support a field native type which can be used to implement efficient native circuits. We also want to support arbitrary extensions. A proposed syntax would be, instead of e.g. u1, we have f1 which represents a native field element with extension 1.

The key challenge with supporting native field elements is that they cannot support all forms of arithmetic. For example, they cannot be used for division, or bitwise operations, etc. Even assigning values of integer type (e.g. u32) to a field element might be restricted in some way (e.g. ensuring that, for the given field type, the value being assigned fits).

Potentially, we should mark any function that uses a native field element with a modified like native or unsafe.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions