
Interfaz independiente del proceso para llamadas al sistema de Linux
Para más detalle sobre los conceptos y la motivación detrás de rsyscall, lee la [[file:docs/conceptual.org][introducción conceptual]].
Ten en cuenta que la API de Python de rsyscall utiliza algunas características recientes de Python 3: async/await y anotaciones de tipo. Si no las has visto antes, hojea primero el [[file:docs/background.org][tutorial de antecedentes]].
Pero, si quieres probarlo, puedes hacerlo con Nix: #+begin_src bash git clone https://github.com/catern/rsyscall cd rsyscall/python nix-shell python #+end_src
O puedes compilarlo manualmente en un entorno virtual: #+begin_src bash git clone https://github.com/catern/rsyscall cd rsyscall python3 -m venv venv . venv/bin/activate pip install -U pip
cd c autoreconf -fvi ./configure --prefix=$PWD/../venv make install cd .. export LD_LIBRARY_PATH=$PWD/venv/lib export PKG_CONFIG_PATH=$PWD/venv/lib/pkgconfig
pip install -e python/ python #+end_src
In [2]: import rsyscall
In [3]: t = await rsyscall.local_process.fork()
In [4]: await t.stdout.write(await t.ptr("Hello world!\n")) Hello world! #+end_example