* origin/main: (26 commits) attempt to import win-ca on windows (#6136) Upgrade e2e-tests windows runner from 4 cores to 8 (#6166) Follow-up fixes after bearing sample rename (#6164) Add test for #5799: "Only showing axis planes when there are no errors" (#6007) Wait for export button to make test more reliable (#6143) sketching on a mirror2d thats been extruded fixed! (#6149) Bump vite from 5.4.16 to 5.4.17 in /packages/codemirror-lang-kcl in the security group (#6150) Bump vite from 5.4.16 to 5.4.17 in the security group (#6151) Update all KCL-Samples to be more ME friendly (#6132) Shorten feedback cycle for legitimate failures (#6146) Remove the camera projection toggle from the UI (#6077) Use all available CPUs to run tests on CI (#6138) [fix] Get rid of risky useEffect in restart onboarding flow (#6133) Feature: Traditional menu actions in desktop application part II (#6030) [Bug] fix some UI friction from imports (#6139) Use scene fixture to make test more reliable on macOS (#6140) Fix: function composition during playwright setup created a massive page.reload loop (#6137) Alternative way to make appMachine spawned children type safe (#5890) [BUG] mutate ast to keep comments for pipe split ast-mod (#6128) Rename the app to Zoo Design Studio (#5974) ...
kcl-lib
Our language for defining geometry and working with our Geometry Engine efficiently. Short for KittyCAD Language, named after our Design API.
Contributing a standard library function
We've built a lot of tooling to make contributing to KCL easier. If you are interested in contributing a new standard library function to KCL, here is the rough process:
- Open just the folder in your editor of choice. VS Code, for example, struggles to run rust-analyzer on the entire modeling-app directory because it's such a turducken of TS and Rust code.
- Find the definition for similar standard library functions in
./kcl/src/std
and place your new one near it or in the same category file. - Add your new code. A new standard library function consists of:
- A
pub async
of the actual standard library function in Rust - A doc comment block containing at least one example using your new standard library function (the Rust compiler will error if you don't provide an example our teammates are dope)
- A
stdlib
macro providing the name that will need to be written by KCL users to use the function (this is usually a camelCase version of your Rust implementation, which is named with snake_case) - An inner function that is published only to the crate
- Add your new standard library function to the long list of CORE_FNS in mod.rs
- Get a production Zoo dev token and run
export KITTYCAD_API_TOKEN=your-token-here
in a terminal - Run
TWENTY_TWENTY=overwrite cargo nextest run --workspace --no-fail-fast
to take snapshot tests of your example code running in the engine - Run
just redo-kcl-stdlib-docs
to generate new Markdown documentation for your function that will be used to generate docs on our website. - Create a PR in GitHub.
Bumping the version
If you bump the version of kcl-lib and push it to crates, be sure to update the repos we own that use it as well. These are: