1
Fork 0

Compare commits

..

No commits in common. "e732623802edf3278d3e3e69acb15990b0694f6b" and "ca447df5258a90dd1a763d7e8d9b8c305dc0e9df" have entirely different histories.

5 changed files with 28 additions and 13 deletions

1
.gitignore vendored
View File

@ -1,5 +1,4 @@
# Generated by Cargo
Cargo.lock
debug/
target/

View File

@ -1,11 +1,11 @@
# https://doc.rust-lang.org/cargo/reference/manifest.html
[package]
name = "webextension-native-messaging"
name = "web-ext-native-messaging"
description = "WebExtension native messaging library for Rust."
repository = "https://git.bauke.xyz/Holllo/webextension-native-messaging"
repository = "https://git.bauke.xyz/Holllo/web-ext-native-messaging"
license = "MIT OR Apache-2.0"
version = "1.0.0"
version = "0.1.0"
authors = ["Holllo <helllo@holllo.org>"]
edition = "2021"

View File

@ -1,6 +1,6 @@
MIT License
Copyright (c) 2021-2022 Holllo <helllo@holllo.org>
Copyright (c) 2021 Holllo <helllo@holllo.cc>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

View File

@ -1,11 +1,22 @@
# WebExtension 🛰 Native Messaging
# web-ext-native-messaging
> **WebExtension native messaging library for Rust.**
WebExtension native messaging with serde_json as the (de)serializer.
## Usage
## Documentation
For documentation and examples see [docs.rs](https://docs.rs/webextension-native-messaging).
See [docs.rs](https://docs.rs/web-ext-native-messaging) for documentation.
## License
Distributed under the [Apache License 2.0](https://spdx.org/licenses/Apache-2.0.html) and [MIT](https://spdx.org/licenses/MIT.html) licenses, see [LICENSE-Apache](https://git.bauke.xyz/Holllo/webextension-native-messaging/src/branch/main/LICENSE-Apache) and [LICENSE-MIT](https://git.bauke.xyz/Holllo/webextension-native-messaging/src/branch/main/LICENSE-MIT) for more information.
Licensed under either of
- Apache License, Version 2.0 ([LICENSE-APACHE](LICENSE-APACHE) or https://www.apache.org/licenses/LICENSE-2.0)
- MIT license ([LICENSE-MIT](LICENSE-MIT) or https://opensource.org/licenses/MIT)
at your option.
#### Contribution
Unless you explicitly state otherwise, any contribution intentionally submitted
for inclusion in the work by you, as defined in the Apache-2.0 license, shall be
dual licensed as above, without any additional terms or conditions.

View File

@ -1,9 +1,11 @@
#![forbid(unsafe_code)]
#![warn(missing_docs, clippy::missing_docs_in_private_items)]
//! # WebExtension Native Messaging
//! # web-ext-native-messaging
//!
//! > **WebExtension native messaging library for Rust.**
//! WebExtension [native messaging] with [`serde_json`] as the (de)serializer.
//!
//! [native messaging]: https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/Native_messaging#app_side
//!
//! ## Reading
//!
@ -50,7 +52,10 @@
//!
//! [native messaging documentation]: https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/Native_messaging
use std::io::{Read, Write};
use std::{
convert::TryInto,
io::{Read, Write},
};
use byteorder::{NativeEndian, ReadBytesExt, WriteBytesExt};