Skip to content

Commit

Permalink
[rust] Move zercopy & packet from //garnet into //src/lib
Browse files Browse the repository at this point in the history
Change-Id: Icacba391fe8ab8d0b5393804c705001e495ed609
  • Loading branch information
benbrittain committed Dec 27, 2019
0 parents commit 4def206
Show file tree
Hide file tree
Showing 31 changed files with 202,492 additions and 0 deletions.
41 changes: 41 additions & 0 deletions BUILD.gn
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Copyright 2018 The Fuchsia Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

import("//build/rust/rustc_library.gni")
import("//build/test/test_package.gni")

rustc_library("zerocopy") {
name = "zerocopy"
version = "0.1.0"
edition = "2018"

with_unit_tests = true

deps = [
"//src/lib/zerocopy/zerocopy-derive",
"//third_party/rust_crates:byteorder",
"//third_party/rust_crates:rand",
]
}

unittest_package("zerocopy_tests") {
deps = [
":zerocopy_test",
]

tests = [
{
name = "zerocopy_lib_test"
environments = basic_envs
},
]
}

group("tests") {
testonly = true

deps = [
":zerocopy_tests",
]
}
26 changes: 26 additions & 0 deletions Cargo.toml.crates-io
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Copyright 2018 The Fuchsia Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

# This file is used when publishing to crates.io

[package]
edition = "2018"
name = "zerocopy"
version = "0.2.8"
authors = ["Joshua Liebow-Feeser <joshlf@google.com>"]
description = "Utilities for zero-copy parsing and serialization"
license = "BSD-3-Clause"
repository = "https://fuchsia.googlesource.com/fuchsia/+/master/src/lib/zerocopy"

include = ["src/*", "Cargo.toml", "LICENSE"]

[dependencies]
zerocopy-derive = { version = "0.1.4" }

[dependencies.byteorder]
version = "1.3"
default-features = false

[dev-dependencies]
rand = "0.6"
1 change: 1 addition & 0 deletions OWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
joshlf@google.com

0 comments on commit 4def206

Please sign in to comment.