Remove alloc dependency

This commit is contained in:
Gary Guo 2021-10-13 16:58:06 +01:00
parent 6eb9fc4e0f
commit 9741d8a177
2 changed files with 3 additions and 7 deletions

View File

@ -1,6 +1,6 @@
[package] [package]
name = "unwinding" name = "unwinding"
version = "0.1.1" version = "0.1.2"
authors = ["Gary Guo <gary@garyguo.net>"] authors = ["Gary Guo <gary@garyguo.net>"]
edition = "2018" edition = "2018"
license = "MIT OR Apache-2.0" license = "MIT OR Apache-2.0"
@ -11,12 +11,12 @@ repository = "https://github.com/nbdd0121/unwinding/"
members = ["cdylib", "example"] members = ["cdylib", "example"]
[dependencies] [dependencies]
gimli = { version = "0.25.0", default-features = false, features = ["read"] } gimli = { version = "0.25.0", default-features = false, features = ["read-core"] }
libc = { version = "0.2", optional = true } libc = { version = "0.2", optional = true }
spin = { version = "0.9", optional = true, default-features = false, features = ["mutex", "spin_mutex"] } spin = { version = "0.9", optional = true, default-features = false, features = ["mutex", "spin_mutex"] }
[patch.crates-io] [patch.crates-io]
gimli = { git = "https://github.com/gimli-rs/gimli.git", rev = "80010ee0442ecd7d0916b0a36cc2d4267fc09dc8" } gimli = { git = "https://github.com/gimli-rs/gimli.git", rev = "7a3aeef78d169b39e15e18f1573492c501b25c68" }
[features] [features]
alloc = [] alloc = []

View File

@ -72,7 +72,3 @@ And that's it! After you ensured that the global allocator is functional, you ca
If your linker supports `--eh-frame-hdr` you can also try to use `fde-gnu-eh-frame-hdr` instead of `fde-static`. GNU LD will provides a `__GNU_EH_FRAME_HDR` magic symbol so you don't have to provide `__eh_frame` through linker script. If your linker supports `--eh-frame-hdr` you can also try to use `fde-gnu-eh-frame-hdr` instead of `fde-static`. GNU LD will provides a `__GNU_EH_FRAME_HDR` magic symbol so you don't have to provide `__eh_frame` through linker script.
If you have your own version of `thread_local` and `println!` working, you can port [`panic_handler.rs`](src/panic_handler.rs) for double-panic protection and stack traces! If you have your own version of `thread_local` and `println!` working, you can port [`panic_handler.rs`](src/panic_handler.rs) for double-panic protection and stack traces!
## TODO
* Remove dependencies on `alloc`.