Skip to content

Commit

Permalink
Update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
mmastrac committed Nov 20, 2024
1 parent 623bf77 commit 7428928
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
9 changes: 8 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@ Module initialization/teardown functions for Rust (like `__attribute__((construc
This library currently requires **Rust > 1.31.0** at a minimum for the
procedural macro support.

Idea inspired by [this code](https://github.com/neon-bindings/neon/blob/2277e943a619579c144c1da543874f4a7ec39879/src/lib.rs#L42) in the Neon project.
## Zero Dependency

As of `ctor 0.3.0+`, `ctor` has no dependencies. The proc macro in this crate
inlines a helper declarative macro that does the majority of the work.

## Support

Expand Down Expand Up @@ -108,3 +111,7 @@ The `#[dtor]` macro effectively creates a constructor that calls `libc::atexit`
libc::atexit(dtor);
}
```

## Inspiration

Idea inspired by [this code](https://github.com/neon-bindings/neon/blob/2277e943a619579c144c1da543874f4a7ec39879/src/lib.rs#L42) in the Neon project.
4 changes: 4 additions & 0 deletions codegen/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# ctor codegen

This project does the codegen to ensure that ctor builds without dependencies. We use
the `quote!` macro to generate a `TokenStream`, and then dump that into a source file.

0 comments on commit 7428928

Please sign in to comment.