summaryrefslogtreecommitdiffstats
path: root/core/src
AgeCommit message (Collapse)Author
2020-10-14Use 'Examples' for the examples section.Justus Winter
- See #480.
2020-10-14Replace most 'extern crate' directives with 'use'.Justus Winter
- See #480.
2020-03-09Switch from failure to anyhow.Justus Winter
- Use the anyhow crate instead of failure to implement the dynamic side of our error handling. anyhow::Error derefs to dyn std::error::Error, allowing better interoperability with other stdlib-based error handling libraries. - Fixes #444.
2020-03-09core: Define core::Error using thiserror.Justus Winter
2019-08-22core: Use 'tempfile' instead of 'tempdir'.Justus Winter
- The latter crate has been deprecated and merged into the former.
2019-06-12core: Replace Context set_lib documentationjuga
that was not describing correctly what set_lib does, probably cause a copy and paste mistake.
2019-05-15core, store, tool: Use realm instead of domain.Justus Winter
- Remove the domain parameter from core::Context. - Replace it with a realm to be passed in when opening a store. - For sq, merge store name and realm into the --store parameter. - Fixes #105.
2019-05-13core, ipc: Defer the creation of the home directory.Justus Winter
- Fixes #271.
2019-03-22openpgp, core: Return old value in setters.Justus Winter
- Fixes #147.
2018-12-07Normalize test module names.Justus Winter
2018-11-01core: Avoid use of deprecated function.Justus Winter
2018-03-01core: Remove unknown error.Justus Winter
2018-01-25core: Refine default home directory.Justus Winter
- Move the call to env::home_dir from Context::configure to Config.build. This lets us handle failures, which should be rare. On systems where it fails (think embedded systems), users have to explicitly provide a path. - Allow ephemeral contexts with explicitly configure home directories. E.g. clients and servers share ephemeral contexts with the same home directory.
2018-01-25core: Make the Context Send + Clone.Justus Winter
- We no longer rely on TempDir to clean up the directory, but we do it in Drop. Since we no longer need the TempDir around, we are now Send. - Implement Clone so that cloned contexts do not delete the temporary home when dropped.
2018-01-23Use the failure crate to handle errors.Justus Winter
- The failure crate is a young error handling solution for Rust. It may change the API, but since we pin our dependencies, this should not be a problem for us, albeit a bit inconvenient. - Introduction of the crate is a bit noisy, but not as bad as anticipated, because failure magically handles all errors used in the standard library. - Matching on concrete error values requires downcasting before matching, which seems a bit unidiomatic. This is the cost of using and "chaining" arbitrary error types. This is something that may be improved later on in the library or language. - Having said that, using the error type in the tool was nice. I did not have to use a downcast, so maybe my worries about downcasts are unjustified because it is not such a common use case after all. On the other hand, the tool is quite simple and our only mode of failure is to print the message.
2018-01-19core: Improve documentation.Justus Winter
2018-01-19core: Add IPCPolicy.Justus Winter
- The IPC policy governs how we spawn background servers. - Add ffi glue.
2018-01-09core: Improve comment.Justus Winter
2018-01-09core,ffi: Convert 'core::NetworkPolicy' to and from u8.Justus Winter
- At some points, we need to convert the policy to a primitive type. It is better to just provide it. - Use it in the ffi glue.
2018-01-08core: Export macro 'assert_match'.Justus Winter
- Unify with the variant in openpgp::tpk.
2018-01-03core: Do not create files in tests.Justus Winter
- Do not create files in $HOME/.sequoia in the doc tests by using ephemeral home directories and not running the example with the simple constructor.
2018-01-03core: Implement ephemeral contexts.Justus Winter
- Ephemeral contexts are useful for tests and one-shot programs. - Add ffi glue.
2018-01-03core,net: Avoid 'unwrap()' in examples.Justus Winter
- We should not even suggest to use unwrap in our examples.
2017-12-14core: Improve the doctests.Justus Winter
- Demonstrate changing the network policy instead of the home directory. This is more robust.
2017-12-14Add network policy.Justus Winter
- The network policy determines how Sequoia connects to remote servers. - Add a policy field in the context. - Add an error indicating a policy violation. - Honor the policy in the net module. - Add ffi glue.
2017-12-13core: Improve error handling.Justus Winter
- Add and use Result and Error type.
2017-12-13core: Improve documentation.Justus Winter
2017-12-13Split up Sequoia.Justus Winter
- Split up into six crates: buffered-reader, openpgp, sequoia-core, sequoia-ffi, sequoia-net, and sequoia-store. - Adjust imports accordingly.