Giter Site home page Giter Site logo

syscalls's Introduction

syscalls

Crates.io docs.rs License

This is a low-level library for listing and invoking raw Linux system calls.

Features

  • Provides a syscall enum for multiple architectures (see table below).
  • Provides methods for invoking raw syscalls.
  • Provides an Errno type for Rustic error handling.
  • Provides O(1) array-backed SysnoSet and SysnoMap types.

Feature Flags

The features that are enabled by default include std and serde.

std

By default, std support is enabled. If you wish to compile in a no_std environment, use:

syscalls = { version = "0.6", default-features = false }

serde

Various types can be serialized with Serde. This can be enabled with:

syscalls = { version = "0.6", features = ["serde"] }

full

Enables all extra features.

all

Enables syscall tables for all architectures. If you don't need all architectures, you can enable them individually with features like arm, x86, powerpc, etc. See the Architecture Support table below for a full list of available architectures.

Architecture Support

The Enum column means that a Sysno enum is implemented for this architecture.

The Invoke column means that syscalls can be invoked for this architecture.

The Stable Rust? column means that syscall invocation only requires stable Rust. Some architectures require nightly Rust because inline assembly is not yet stabilized for all architectures.

Arch Enum Invoke Stable Rust?
arm Yes ✅
aarch64 Yes ✅
mips No ❌
mips64 No ❌
powerpc No ❌
powerpc64 No ❌
s390x No ❌
sparc N/A
sparc64 N/A
x86 Yes ✅
x86_64 Yes ✅

Updating the syscall list

Updates are pulled from the .tbl files in the Linux source tree.

  1. Change the Linux version in syscalls-gen/src/main.rs to the latest version. Only updated to the latest stable version (not release candidates).
  2. Run cd syscalls-gen && cargo run. This will regenerate the syscall tables in src/arch/.

syscalls's People

Contributors

dvdhrm avatar jasonwhite avatar kpp avatar loganwendholt avatar nyurik avatar wangbj avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.