When using "native" size & alignment, we do not really have a way to find the native size of alignment of types. But it's almost always safe to assume that node.js is compiled for the standard architectures, so native behaves like standard. If anyone stumbles accross a different case, I'll be happy to review it on that specific instance, and figure out what to do.
https://github.com/danielgindi/node-python-structTags | pack unpack struct cstruct |
Implementation | Javascript |
License | MIT |
Platform | OS-Independent |
Kaitai Struct is a declarative language used for describing various binary data structures laid out in files or in memory: i.e. binary file formats, network stream packet formats, etc. The main idea is that a particular format is described in Kaitai Struct language only once and then can be compiled with a ksc into source files in one of the supported programming languages. These modules will include a generated code for a parser that can read described data structure from a file / stream and give access to it in a nice, easy-to-comprehend API.
reverse-engineering protocol-analyser file-format declarative-language kaitai-struct c-plus-plus graphvizThis repository constitutes a library of ready-made binary file format descriptions using Kaitai Struct language (.ksy). If you want to explore the repository, please visit Kaitai Struct format gallery — that's HTML rendition of this repository, which block diagrams, all the code compiled for all possible target languages, provided with usage examples and instructions, etc, etc.
kaitai-struct file-format protocol-parserRefureku is a powerful C++17 RTTI free runtime reflection library based on Kodgen. It allows to retrieve information on namespaces, structs/classes, fields, methods, non-member variables, non-member functions, enums and enum values at runtime.
reflection reflection-library cpp-librarystruct is a tool for iOS and Mac developers to automate the creation and management of Xcode projects. Ever lamented over your unorganised project files? struct solves that by making your filesystem be your project structure. How it is on disk is how it is in your project. Simple.
xcode ios mac projectsAn interesting go struct tag expression syntax for field validation, etc.
struct-tag dsl expression validatorFaker will generate you a fake data based on your Struct.
generator faker struct dummy-data dummy-data-generator fake-data mock-data testing-toolsReleased under the MIT License.
golang-package copyPackage validator implements value validations for structs and individual fields based on tags.Use go get.
validation translation error-handlingsqlmock is a mock library implementing sql/driver. Which has one and only purpose - to simulate any sql driver behavior in tests, without needing a real database connection. It helps to maintain correct TDD workflow.NOTE: in v1.2.0 sqlmock.Rows has changed to struct from interface, if you were using any type references to that interface, you will need to switch it to a pointer struct type. Also, sqlmock.Rows were used to implement driver.Rows interface, which was not required or useful for mocking and was removed. Hope it will not cause issues.
sql-driver mock database tdd testing sqlSimplify your golang json usage by extracting fields or items from arrays and objects with a simple, hierarchical query. API Documentation on godoc.org.This package is meant to make working with complex feeds a bit more easy. If you have simple feeds you want to model with struct types, check out jflect, which will create struct definitions given a json document.
Envconfig supports the use of struct tags to specify alternate, default, and required environment variables.Envconfig has automatic support for CamelCased struct elements when the split_words:"true" tag is supplied. Without this tag, AutoSplitVar above would look for an environment variable called MYAPP_AUTOSPLITVAR. With the setting applied it will look for MYAPP_AUTO_SPLIT_VAR. Note that numbers will get globbed into the previous word. If the setting does not do the right thing, you may use a manual override.
Go tool to modify/update field tags in structs. gomodifytags makes it easy to update, add or delete the tags in a struct field. You can easily add new tags, update existing tags (such as appending a new key, i.e: db, xml, etc..) or remove existing tags. It also allows you to add and remove tag options. It's intended to be used by an editor, but also has modes to run it from the terminal. Read the usage section below for more information.By default every change will be printed to stdout. So it's safe to run it and see the results of it. If you want to change it permanently, pass the -w (write) flag.
structs tags toolgojson generates go struct definitions from json or yaml documents.Assuming $GOPATH/bin is in your PATH, you can now invoke gojson directly.
gojson cli go-generate utility go-libraryDeclare the command line arguments your program accepts by defining a struct. As the example above shows, the help tag can be used in conjunction with arg, or instead. When used together, they can appear in either order.
argument-parsingParse command line argument by defining a struct. It combines clap with custom derive. Find it on Docs.rs. You can also check the examples and the changelog.
A wrapper around go-yaml designed to enable a better way of handling YAML when marshaling to and from structs. In short, this library first converts YAML to JSON using go-yaml and then uses json.Marshal and json.Unmarshal to convert to or from the struct. This means that it effectively reuses the JSON struct tags as well as the custom JSON methods MarshalJSON and UnmarshalJSON unlike go-yaml. For a detailed overview of the rationale behind this method, see this blog post.
godb is a simple Go query builder and struct mapper, not a full-featured ORM. godb does not manage relationships. Initially, godb was a learning project. The goal was to improve my Go skills by doing some useful things. But more and more features have been added and godb has become a serious project that can be used by others.
sql orm databasesandboss is a messaging framework generator that creates complete communications, persistency, UI forms, configuration management, and runtime control infrastructure from struct and node declarations. Full generator support in the dependency-aware build
cymem provides two small memory-management helpers for Cython. They make it easy to tie memory to a Python object's life-cycle, so that the memory is freed when the object is garbage collected. The Pool object saves the memory addresses internally, and frees them when the object is garbage collected. Typically you'll attach the Pool to some cdef'd class. This is particularly handy for deeply nested structs, which have complicated initialization functions. Just pass the Pool object into the initializer, and you don't have to worry about freeing your struct at all — all of the calls to Pool.alloc will be automatically freed when the Pool expires.
cythonUnpack multibyte binary values from buffers and streams. You can specify the endianness and signedness of the fields to be unpacked too.This module is a cleaner and more complete version of bufferlist's binary module that runs on pre-allocated buffers instead of a linked list.
binary decode endian unpack signed unsigned
We have large collection of open source products. Follow the tags from
Tag Cloud >>
Open source products are scattered around the web. Please provide information
about the open source projects you own / you use.
Add Projects.