6 releases

0.1.3 Feb 3, 2023
0.1.2 Jan 31, 2023
0.0.2 Jan 20, 2023

#37 in #inline

MIT license

10KB
134 lines

SJLJ - setjmp & longjmp for Rust

crates.io Released API docs MIT licensed

A small no_std library that provides inline asm functions for the setjmp and longjmp functions. Also provides sigsetjmp and siglongjmp on Linux. This is for using them without requiring a libc. The functions are ported from musl.

For a great article on how setjmp and longjmp work check out Mark Mossberg's blogpost which walks through x86's assembly implementation.

Implemented Architectures:

  • x86_64

Dependencies

~0.3–2.8MB
~76K SLoC