Repository navigation
Add examples of Rust, and release the crate to crates.io - #28
Merged
Merged
Conversation
… built with maturin: and release the crate to crates.io
…and correct its spelling
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two examples of Rust, and what a project of Rust needs to depend on dataclass-native's crate: that it is on crates.io.
Examples
examples/parquet-rust: a program of Rust alone which writes orders as Parquet files and reads them back, with arrow-rs'sparquet. As the C++ example of Parquet, with its schema and its orders.src/parquet_files.rsis what to copy from:to_parquetandfrom_parquet, of the files which Python's write and read.examples/functions-rust: an extension in Rust built with maturin. As the C++ example of functions, with its schema, functions and demo. Its functions are plain Rust of the generated structs, and itslib.rsis what gives them to Python.build.rsgenerates the Rust from the Python schema when the crate is built.The crate, on crates.io
dataclass_nativeis no longerpublish = false, and has a version, 1.2.0, which is to be that of the Python package it is released with.CARGO_REGISTRY_TOKEN, as well as the package.dataclass-native rust-dirprints.Also
Tested: each example is built with cargo by a test, which runs it. Of the Parquet, Python reads what Rust wrote, and Rust what Python wrote. Of the extension, its demo gives the same in each mode. Checked by hand, and not by a test:
maturin buildmakes a wheel of the extension which installs and runs; Rust reads the Parquet which the C++ example writes; andcargo publish --dry-runpackages the crate.To release: tag
v1.2.0, once this is merged.