Skip to main content

Anchor Programming Language

anchor build python pypi license

Building and Installing

Anchor requires Python 3.9 or later

Install the latest release from The Python Package Index (PyPI):

pip install anpl

Build and install locally

Run the following commands in order:

python3 -m pip install --upgrade pip
python3 -m pip install --upgrade build
python3 -m build
pip install ./dist/anpl-<version>.tar.gz --force-reinstall

Running

Run the Anchor compiler:

an [option] [file]

an --help for more information


Getting Started

This is an example of the Anchor code to print Hello, World!:

print("Hello, World!");

This is an example of the Anchor code to define a class:

class[public] MyClass
begin
    property[public, get, set] x: Integer;

    method[public, factory] MyClass() -> MyClass
    begin
        this.x = 0;
        this.printSomething();
        return this;
    end

    method[public, factory] MyClass(x: Integer) -> MyClass
    begin
        this.x = x;
        return this;
    end

    method[private] printSomething() -> Null
    begin
        print("this is a private method");
    end
end

This is an example of the legacy function definition to return a string:

function myFunc() -> String
begin
    return "a legacy function";
end

Contributing

I am excited to work alongside you to build and enhance Anchor Programming Language!

BEFORE you start work on a feature/fix, please read and follow the Contributor's Guide to help avoid any wasted or duplicate effort.


Code of Conduct

This project has adopted the Contributor Covenant Code of Conduct. For more information contact luo@jiahai.co with any additional questions or comments.

Release files for anpl 0.0.7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for anpl 0.0.7
File Size Uploaded
anpl-0.0.7.tar.gz 48.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for anpl 0.0.7
File Interpreter ABI Platform
anpl-0.0.7-py3-none-any.whl Python 3 none any Details

Total release size: 99.7 kB

Release files / anpl-0.0.7.tar.gz

Download URL anpl-0.0.7.tar.gz
Size 48.7 kB
Tags Source
SHA-256 checksum
How to use checksums
d695d24954c132abb0b06973641ea56045cdf71703f8967e0ed51448db4e3c49
BLAKE2b-256 checksum
How to use checksums
5ceada3bfefa6e0c105d9300842f4a5f55b55fa85e68cd03907f77edf01e5447
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.7.1 importlib_metadata/4.9.0 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.9

Release files / anpl-0.0.7-py3-none-any.whl

Download URL anpl-0.0.7-py3-none-any.whl
Size 51.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8fffd57013b8a4763f83bb65eb99beb869733976bb8e76e00b5851100921a586
BLAKE2b-256 checksum
How to use checksums
41d6956af5c7c363da6faac776a1c59fdd36ae87762310aa185f16a756bb7099
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.7.1 importlib_metadata/4.9.0 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.9

Release history Release notifications | RSS feed

This release

0.0.7 This release

2 release files

0.0.6

2 release files

0.0.5

2 release files

0.0.3

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page