Skip to content

atilaneves/python-dpp-nanomsg

master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Call nanomsg from Python using D as the glue layer

This repository is an example of using D's powerful metaprogramming features to enable calling C code from Python without having to write any code at all.

To package all needed dependencies to build and run the example, there is a Dockerfile but the container doesn't need to be manually built. Just:

  • Run docker/docker-run.sh. This will build the Docker container and run bash within it.
  • Run make as soon as you get a bash prompt in the container. This will build a Python extension then run Python tests that call into the nanomsg C library.

That's it. The user code that enables the magic seen in that Python file is 4 lines in two files.

The library code that enables it is in two dub packages: autowrap and dpp.

About

Automagically call nanomsg from Python with 2 lines of D code

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published