Skip to content

Commit

Permalink
Merge pull request #71 from szepeviktor/byte-level-care
Browse files Browse the repository at this point in the history
Introduce EditorConfig
  • Loading branch information
Manishearth authored Oct 22, 2023
2 parents 94d0205 + 0fca10e commit 3df7b3f
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 10 deletions.
17 changes: 17 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# https://EditorConfig.org

root = true

[*]
indent_style = space
indent_size = 4
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[*.yml]
indent_size = 2

[LICENSE-*]
indent_style = unset
4 changes: 2 additions & 2 deletions LICENSE-APACHE
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
Expand All @@ -192,7 +192,7 @@ Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0
http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
Expand Down
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@

Fork of Arc. This has the following advantages over std::sync::Arc:

* `triomphe::Arc` doesn't support weak references: we save space by excluding the weak reference count, and we don't do extra read-modify-update operations to handle the possibility of weak references.
* `triomphe::UniqueArc` allows one to construct a temporarily-mutable `Arc` which can be converted to a regular `triomphe::Arc` later
* `triomphe::OffsetArc` can be used transparently from C++ code and is compatible with (and can be converted to/from) `triomphe::Arc`
* `triomphe::ArcBorrow` is functionally similar to `&triomphe::Arc<T>`, however in memory it's simply `&T`. This makes it more flexible for FFI; the source of the borrow need not be an `Arc` pinned on the stack (and can instead be a pointer from C++, or an `OffsetArc`). Additionally, this helps avoid pointer-chasing.
* `triomphe::Arc` has can be constructed for dynamically-sized types via `from_header_and_iter`
* `triomphe::ThinArc` provides thin-pointer `Arc`s to dynamically sized types
* `triomphe::ArcUnion` is union of two `triomphe:Arc`s which fits inside one word of memory
* `triomphe::Arc` doesn't support weak references: we save space by excluding the weak reference count, and we don't do extra read-modify-update operations to handle the possibility of weak references.
* `triomphe::UniqueArc` allows one to construct a temporarily-mutable `Arc` which can be converted to a regular `triomphe::Arc` later
* `triomphe::OffsetArc` can be used transparently from C++ code and is compatible with (and can be converted to/from) `triomphe::Arc`
* `triomphe::ArcBorrow` is functionally similar to `&triomphe::Arc<T>`, however in memory it's simply `&T`. This makes it more flexible for FFI; the source of the borrow need not be an `Arc` pinned on the stack (and can instead be a pointer from C++, or an `OffsetArc`). Additionally, this helps avoid pointer-chasing.
* `triomphe::Arc` has can be constructed for dynamically-sized types via `from_header_and_iter`
* `triomphe::ThinArc` provides thin-pointer `Arc`s to dynamically sized types
* `triomphe::ArcUnion` is union of two `triomphe:Arc`s which fits inside one word of memory

This crate is a version of `servo_arc` meant for general community use.
This crate is a version of `servo_arc` meant for general community use.

0 comments on commit 3df7b3f

Please sign in to comment.