Skip to content

About

An attempt at using Nix to create a local development environment for the WASI build of Python

Topics

Resources

Stars

1 star

Watchers

1 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Python + WASI with Nix

This is an attempt at using Nix to create a local development environment for the WASI build of Python.

Try it out

Assuming you already have Nix installed with flakes enabled.

  1. Clone the repo

    $ git clone https://github.com/alcarney/python-wasi-nix
    $ cd python-wasi-nix
    
  2. Activate the devShell

    $ nix develop
    
  3. Run the script

    $ python main.py
    sys.platform='wasi'
    {'line': 1, 'character': 42}
    

Resources

TODO

This is "good enough" for me to start hacking on the WASI runtime, but there's certainly plenty that could potnetially be improved.

  • Building Python WASI from source
  • Automatically choosing the right Python package set to use with mkPythonWASIShell, like python.withPackages
  • Extending mkPythonWASIShell to allow the user to set the permissions for the Python process
  • Overriding a base python derivation so that packages are built against this version of Python.
  • Extending this to work with packages that contain native modules?

About

An attempt at using Nix to create a local development environment for the WASI build of Python

Topics

Resources

Stars

1 star

Watchers

1 watching

Forks

Contributors

Languages