gvisor.dev/gvisor@v0.0.0-20240520182842-f9d4d51c7e0f/pkg/state/BUILD (about) 1 load("//tools:defs.bzl", "go_library") 2 load("//tools/go_generics:defs.bzl", "go_template_instance") 3 4 package( 5 default_applicable_licenses = ["//:license"], 6 licenses = ["notice"], 7 ) 8 9 go_template_instance( 10 name = "deferred_list", 11 out = "deferred_list.go", 12 package = "state", 13 prefix = "deferred", 14 template = "//pkg/ilist:generic_list", 15 types = { 16 "Element": "*objectEncodeState", 17 "Linker": "*objectEncodeState", 18 }, 19 ) 20 21 go_template_instance( 22 name = "complete_list", 23 out = "complete_list.go", 24 package = "state", 25 prefix = "complete", 26 template = "//pkg/ilist:generic_list", 27 types = { 28 "Element": "*objectDecodeState", 29 "Linker": "*objectDecodeState", 30 }, 31 ) 32 33 go_template_instance( 34 name = "addr_range", 35 out = "addr_range.go", 36 package = "state", 37 prefix = "addr", 38 template = "//pkg/segment:generic_range", 39 types = { 40 "T": "uintptr", 41 }, 42 ) 43 44 go_template_instance( 45 name = "addr_set", 46 out = "addr_set.go", 47 consts = { 48 "minDegree": "10", 49 }, 50 imports = { 51 "reflect": "reflect", 52 }, 53 package = "state", 54 prefix = "addr", 55 template = "//pkg/segment:generic_set", 56 types = { 57 "Key": "uintptr", 58 "Range": "addrRange", 59 "Value": "*objectEncodeState", 60 "Functions": "addrSetFunctions", 61 }, 62 ) 63 64 go_library( 65 name = "state", 66 srcs = [ 67 "addr_range.go", 68 "addr_set.go", 69 "complete_list.go", 70 "decode.go", 71 "decode_unsafe.go", 72 "deferred_list.go", 73 "encode.go", 74 "encode_unsafe.go", 75 "state.go", 76 "state_norace.go", 77 "state_race.go", 78 "stats.go", 79 "types.go", 80 ], 81 marshal = False, 82 stateify = False, 83 visibility = ["//:sandbox"], 84 deps = [ 85 "//pkg/state/wire", 86 ], 87 )