Skip to main content

Introduction

The ppci (pure python compiler infrastructure) project is a compiler written entirely in python.

The project contains the following:

  • A Compiler, an assembler, a linker and a build system

  • Language front-ends: Brainfuck, c3

  • Backends: 6500, arm, avr, msp430, risc-v, x86_64

Command line tools

Use it to build projects:

$ pip install ppci
$ ppci-build.py -f examples/build.xml
$ qemu-system-arm -M lm3s6965evb -kernel snake.bin -serial stdio

This runs the snake demo on an emulated (qemu) lm3s demo board and displays the game to the console.

Api

Or use the api:

>>> from ppci.arch.x86_64 import instructions, registers
>>> i = instructions.Pop(registers.rbx)
>>> i.encode()
b'['
>>> import io
>>> from ppci.api import asm
>>> source_file = io.StringIO("""section code
... pop rbx
... push r10
... mov rdi, 42""")
>>> obj = asm(source_file, 'x86_64')
>>> obj.get_section('code').data
bytearray(b'[ARH\xbf*\x00\x00\x00\x00\x00\x00\x00')

Documentation

Documentation can be found here:

dronestate appveyor codecov docstate version devstate pyimpls pyversions license downloads

Metadata

Release files for ppci 0.3.0

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

Source distribution (sdist)

Source distribution for ppci 0.3.0
File Size Uploaded
ppci-0.3.0.tar.gz 177.5 kB Details

Release files / ppci-0.3.0.tar.gz

Download URL ppci-0.3.0.tar.gz
Size 177.5 kB
Tags Source
SHA-256 checksum
How to use checksums
25f1c9e37ba08554cec8261d0ea3cbe40f425f4de558f5c98a998beb42c3fe1f
BLAKE2b-256 checksum
How to use checksums
c474915d2513460ec374b3b39dbeb97ba72c210bb44d977d718837ea9ab4709b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

0.5.8

2 release files

0.5.7

2 release files

0.5.6

2 release files

0.5.5

2 release files

0.5.4

2 release files

0.5.3

2 release files

0.5.2

2 release files

0.5.1

3 release files

0.5

2 release files

0.4.0

2 release files

This release

0.3.0 This release

1 release file

0.2.0

0.1.0

1 release file

0.0.5

1 release file

0.0.4

1 release file

0.0.3

1 release file

0.0.2

1 release file

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