poly-gui / nanoc Goto Github PK
View Code? Open in Web Editor NEWThe NanoPack compiler
License: MIT License
The NanoPack compiler
License: MIT License
Currently, a field number must be explicitly assigned for every field in a message. The field numbers only indicate the order of the fields in the serialized bytes. For example, field number 0 appears first in the buffer, then field number 1, so on and so forth. Field numbers are needed because the YAML parser doesn't guarantee that the fields are traversed in the order they appear in the schema file, and the numbers are therefore used to give the compiler a consistent order across invocations.
In a7609e1, the YAML parser was downgraded to introduce the MapSlice
struct that preserves the order of the fields as they appear in the schema file. This eliminates the need for explicit field numbers, which reduces noise in the schema file.
Currently, a type ID must be explicitly specified for every NanoPack message in its schema. As the project grows, this will be completely unmaintainable. To mitigate this, the compiler should be able to:
To do so, the compiler should follow the following algorithm:
check whether the generated code for a schema exists
if it exists:
read code header and check if a type ID is assigned
if not exist:
generate a new type ID
write the type ID to the code header
else:
generate a new type ID
write the type ID to the code header
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.