From d90dffbe880cc8f01d5df49fdbf533465543b38d Mon Sep 17 00:00:00 2001 From: Chaitanya Parab Date: Thu, 26 Mar 2026 19:49:44 +0530 Subject: [PATCH 1/2] my idea --- docs/idea_apiaudit.md | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 docs/idea_apiaudit.md diff --git a/docs/idea_apiaudit.md b/docs/idea_apiaudit.md new file mode 100644 index 00000000000..87173a4d0e1 --- /dev/null +++ b/docs/idea_apiaudit.md @@ -0,0 +1,34 @@ + +### Initial Idea Submission + +* Full Name: Chaitanya Shivram Parab +* Email: [cparab02@gmail.com](mailto:cparab02@gmail.com) +* [Github](https://github.com/Chaitanya-Parab) +* [LinkedIn](https://www.linkedin.com/in/chaitanya-parab/) +* University name: Sindhudurg Shikshan Prasarak Mandal's College of Engineering, Kankavli +* Degree: Bachelor's of Engineering +* Major: Computer Science +* Year: 3rd year +* Expected graduation date: 2027 + +Project Title: Public API Audit and Stabilization for Boa 1.0 +Relevant issues: (https://github.com/boa-dev/boa/issues/4524) + + +### Idea description:### + +Boa is approaching its 1.0 release, making API stability a critical requirement. Public APIs must be carefully reviewed to ensure they are consistent, well-documented and resilient to future changes without introducing breaking changes.My approach will focus on systematically auditing Boa’s public API surface and improving it to align with long-term stability goals. I plan to begin by identifying all publicly exposed items (pub structs, enums, traits and functions) across the codebase. Once identified, I will evaluate whether each item is intentionally public or should be restricted (e.g., converted to pub(crate) where appropriate). + + A key part of the audit will involve: + + 1. Replacing public struct fields with getter methods to prevent breaking changes in future modifications. + + 2. Introducing #[non_exhaustive] where appropriate to allow extensibility of enums and structs. + + 3. Ensuring consistent API design patterns across modules. + + 4. Improving documentation for public-facing APIs to clearly define usage and guarantees. + +I will take an incremental approach by working module-by-module, submitting small, focused pull requests to ensure reviewability and continuous progress.If time permits, I would also explore tooling or CI checks to detect unintended public API changes, helping maintain stability in the long term. + +This project aligns closely with Boa’s goal of achieving a robust and stable 1.0 release, while also improving developer experience and maintainability. \ No newline at end of file From 60023373267fbe82cb9bbd244c4e8e83551107da Mon Sep 17 00:00:00 2001 From: Chaitanya Parab Date: Fri, 27 Mar 2026 18:54:55 +0530 Subject: [PATCH 2/2] Fix incorrect documentation for is_empty in SpannedSourceText --- core/engine/src/host_defined.rs | 7 +++++++ core/engine/src/spanned_source_text.rs | 5 ++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/core/engine/src/host_defined.rs b/core/engine/src/host_defined.rs index 3585c8ccc10..ae2d3ec8a5a 100644 --- a/core/engine/src/host_defined.rs +++ b/core/engine/src/host_defined.rs @@ -30,6 +30,13 @@ fn downcast_boxed_native_object_unchecked(obj: Box(&mut self) -> Option> { self.types diff --git a/core/engine/src/spanned_source_text.rs b/core/engine/src/spanned_source_text.rs index ab97d39b17e..f1ce169cf4f 100644 --- a/core/engine/src/spanned_source_text.rs +++ b/core/engine/src/spanned_source_text.rs @@ -80,7 +80,10 @@ impl SpannedSourceText { self.source_text.clone() } - /// Test if the span is empty. + /// Returns `true` if the span or the source text is empty. + /// + /// # Returns + /// `true` if there is no span or the underlying source text is empty, otherwise `false`. #[inline] #[must_use] pub fn is_empty(&self) -> bool {