Skip to content

Restructure project to separate core provider APIs from non-provider APIs#169

Merged
nekevss merged 10 commits intomainfrom
lib-restructure-concept
Jan 22, 2025
Merged

Restructure project to separate core provider APIs from non-provider APIs#169
nekevss merged 10 commits intomainfrom
lib-restructure-concept

Conversation

@nekevss
Copy link
Member

@nekevss nekevss commented Jan 18, 2025

This PR lays out the general concept laid out in #165.

Primarily, this PR splits the core Temporal functionality that can be used by engines into the builtins::core module and then builds out wrappers for nearly all of the core builtins (Currently only PlainYearMonth and PlainMonthDay have not had wrappers implemented) that can be used directly from Rust in the builtins::native module.

Ideally, this provides a better experience for using the library natively from Rust (while also giving us a cleaner API to write tests with), but still allows with_provider API to be used for engines and/or anyone else who wants to implement their own TimeZoneProvider.

@jasonwilliams
Copy link
Member

I don't think we need to be as detailed but it would be nice to generate an architecture.md file similar to https://github.com/rust-lang/rust-analyzer/blob/master/docs/dev/architecture.md which can then explain the dir structure.

Copy link
Member

@jedel1043 jedel1043 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Completely agree with all the changes. I just have a small typo fix and then we can merge this :)

available to import from the `temporal_rs`'s root.

The core implementation can be made available from the root by providing
the `--no-default-feautres` flag.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
the `--no-default-feautres` flag.
the `--no-default-features` flag.

@nekevss nekevss merged commit f1154b0 into main Jan 22, 2025
6 checks passed
@nekevss nekevss deleted the lib-restructure-concept branch January 22, 2025 05:43
jedel1043 pushed a commit that referenced this pull request Jan 23, 2025
This PR fixes #169 and is related to #165, and a couple of other issues
/ discussions that popped up after the restructure merge.

This mainly restructures the codebase to remove the wrapping types and
flag the non "with_provider" methods behind a non-default
"compiled_data" flag.

Let me know what you think!
@jedel1043 jedel1043 added C-enhancement New feature or request C-api Changes related to the public API labels Feb 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

C-api Changes related to the public API C-enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants