
Interface indépendante du processus pour les appels système Linux
Pour plus de détails sur les concepts et la motivation derrière rsyscall, lisez l'[[file:docs/conceptual.org][introduction conceptuelle]].
Notez que l'API Python de rsyscall utilise certaines fonctionnalités récentes de Python 3 : async/await et annotations de type. Si vous ne les avez pas vues auparavant, parcourez d'abord le [[file:docs/background.org][tutoriel d'arrière-plan]].
Mais, si vous voulez l'essayer, vous pouvez le faire avec Nix : #+begin_src bash git clone https://github.com/catern/rsyscall cd rsyscall/python nix-shell python #+end_src
Ou vous pouvez le construire manuellement dans un environnement virtuel : #+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