[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/beardbolt 246377bbff 173/323: Add dummy panic handler t
From: |
ELPA Syncer |
Subject: |
[elpa] externals/beardbolt 246377bbff 173/323: Add dummy panic handler to reduce size of zig diassembly |
Date: |
Thu, 9 Mar 2023 10:58:28 -0500 (EST) |
branch: externals/beardbolt
commit 246377bbff99734f30daedf2c47c03283c97e7c5
Author: Jay Kamat <jaygkamat@gmail.com>
Commit: Jay Kamat <jaygkamat@gmail.com>
Add dummy panic handler to reduce size of zig diassembly
Follow up from discussion in !7
---
doc/rmsbolt.org | 11 +++++++++++
doc/rmsbolt.texi | 11 +++++++++++
starters/rmsbolt.zig | 7 +++++++
3 files changed, 29 insertions(+)
diff --git a/doc/rmsbolt.org b/doc/rmsbolt.org
index d27a4be23a..0dd8963fe4 100644
--- a/doc/rmsbolt.org
+++ b/doc/rmsbolt.org
@@ -175,6 +175,17 @@ supported at the moment, with ~sbcl~ giving much better
results.
Assembly is generated through the ~zig~ compiler. Due to large binary sizes,
disassembly is discouraged.
+Zig embeds a panic handler which inflates the size of binaries. In order to
+reduce this to a manageable level, you can add the following snippet to your
+file:
+
+#+BEGIN_SRC zig
+ pub fn panic(msg: []const u8, error_return_trace:
?*@import("builtin").StackTrace) noreturn {
+ while (true) {
+ }
+ }
+#+END_SRC
+
* Integrations
This section covers integrations that RMSbolt provides, which make it easier to
use RMSbolt with complex projects with many dependencies.
diff --git a/doc/rmsbolt.texi b/doc/rmsbolt.texi
index c552495350..9727b03396 100644
--- a/doc/rmsbolt.texi
+++ b/doc/rmsbolt.texi
@@ -290,6 +290,17 @@ supported at the moment, with @code{sbcl} giving much
better results.
Assembly is generated through the @code{zig} compiler. Due to large binary
sizes,
disassembly is discouraged.
+Zig embeds a panic handler which inflates the size of binaries. In order to
+reduce this to a manageable level, you can add the following snippet to your
+file:
+
+@example
+pub fn panic(msg: []const u8, error_return_trace:
?*@@import("builtin").StackTrace) noreturn @{
+ while (true) @{
+ @}
+@}
+@end example
+
@node Integrations
@chapter Integrations
diff --git a/starters/rmsbolt.zig b/starters/rmsbolt.zig
index 1cfa66bd54..60527742ee 100644
--- a/starters/rmsbolt.zig
+++ b/starters/rmsbolt.zig
@@ -22,3 +22,10 @@ pub fn main() void {
std.debug.warn("{c}\n", a);
}
}
+
+// Zig embeds a panic handler that prints stack traces, causing a disassembly
much larger than normal.
+// You can optionally place this function in files you disassemble to make
them easier to digest.
+pub fn panic(msg: []const u8, error_return_trace:
?*@import("builtin").StackTrace) noreturn {
+ while (true) {
+ }
+}
- [elpa] externals/beardbolt 067096f3b9 299/323: Friendlier beardbolt--output-mode, (continued)
- [elpa] externals/beardbolt 067096f3b9 299/323: Friendlier beardbolt--output-mode, ELPA Syncer, 2023/03/09
- [elpa] externals/beardbolt 0ae21a302a 302/323: Simplify window management in preparation of beardbolt-execute-program, ELPA Syncer, 2023/03/09
- [elpa] externals/beardbolt 842b2159da 305/323: More simplification, ELPA Syncer, 2023/03/09
- [elpa] externals/beardbolt 60d189b0a6 310/323: Advertise beardbolt-execute and a few other things, ELPA Syncer, 2023/03/09
- [elpa] externals/beardbolt c374b17f5c 314/323: Don't require file to be saved, but do take advantage if it is, ELPA Syncer, 2023/03/09
- [elpa] externals/beardbolt 4a050afaaa 315/323: Attempt to fix more window management bugs, ELPA Syncer, 2023/03/09
- [elpa] externals/beardbolt 0d61c2edac 311/323: Add support for rustc, ELPA Syncer, 2023/03/09
- [elpa] externals/beardbolt be3cf0a712 318/323: Fix problems with beardbolt-compile when file is saved, ELPA Syncer, 2023/03/09
- [elpa] externals/beardbolt 349ace7310 164/323: Merge branch 'master' of gitlab.com:jgkamat/rmsbolt, ELPA Syncer, 2023/03/09
- [elpa] externals/beardbolt 5aeda6f846 155/323: Add basic documentation for compile_commands.json, ELPA Syncer, 2023/03/09
- [elpa] externals/beardbolt 246377bbff 173/323: Add dummy panic handler to reduce size of zig diassembly,
ELPA Syncer <=
- [elpa] externals/beardbolt 73dcaca98d 177/323: Remove unneeded variables, ELPA Syncer, 2023/03/09
- [elpa] externals/beardbolt 28ccabf318 190/323: Clean up overlays and simplify hook when asm buffer is closed, ELPA Syncer, 2023/03/09
- [elpa] externals/beardbolt 3a8964d537 204/323: Update Readme, ELPA Syncer, 2023/03/09
- [elpa] externals/beardbolt 7c81d55d3e 202/323: Format go block, ELPA Syncer, 2023/03/09
- [elpa] externals/beardbolt 9b1a5abbdf 208/323: Strip -flto flag from compile_commands.json by default, ELPA Syncer, 2023/03/09
- [elpa] externals/beardbolt d257e51fce 244/323: starters/zig: Automatically export functions, ELPA Syncer, 2023/03/09
- [elpa] externals/beardbolt ebbdebc66f 239/323: Improve compilation buffer display UX, ELPA Syncer, 2023/03/09
- [elpa] externals/beardbolt f6b72fe0eb 248/323: First stab at rainbow overlays, ELPA Syncer, 2023/03/09
- [elpa] externals/beardbolt 3cace942b8 251/323: Fix buffer selection problems, ELPA Syncer, 2023/03/09
- [elpa] externals/beardbolt 041234b499 241/323: Improve auto-compilation, ELPA Syncer, 2023/03/09