bobcat-panic

Crates.iobobcat-panic
lib.rsbobcat-panic
version0.7.19
created_at2025-10-13 07:21:41.735188+00
updated_at2026-01-23 10:08:35.594443+00
descriptionBobcat utilities with a panic handler on Arbitrum Stylus.
homepagehttps://bobcat.so
repositoryhttps://github.com/stylus-developers-guild/bobcat-sdk
max_upload_size
id1880123
size22,969
Bayge (af-afk)

documentation

README

bobcat-panic

bobcat-panic is a custom panic handler with several features supporting Stylus devex:

panic-revert

panic-revert will implement a custom panic_handler that will print a stack trace if a panic takes place. This is useful for development when the codesize isn't prohibitive.

panic-loc

panic-loc is similar to its panic-revert cousin, except it prints only the filename and the line of the revert. This could be used in a production situation relatively safely, since the codesize impact is minimal.

panic

panic is a simple panic handler that simply uses the unreachable instruction to revert.

msg-on-sdk-err

bobcat-sdk implements several Solidity-style error messages if the SDK internally fails. These include overflow, decoding, and more. The SDK can explain where and what went wrong using panic-revert or panic-loc if one of the two is enabled and this is enabled as well.

What to use?

Use panic if you're deploying to production and codesize is an issue. Don't be afraid to use panic-loc in production if you want a location if you have a revert to simplify development for programmers identifying issues cropping up in practice. panic-revert is useful for a full stack trace and explanation of the revert, and might be better avoided in practice due to how massive the binaries will become. Though, bobcat-sdk binaries are very small, so it could be safe to use this in practice.

How to use?

Opt out of std using no_std, and simply import this package with one of the feature flags set.

Commit count: 389

cargo fmt