Skip to content

Commit 5e4b946

Browse files
antoniosarosiimalsogregba11b0yJesús Lapastoraellipsis-dev[bot]
authored
Baml VM (#2089)
<!-- ELLIPSIS_HIDDEN --> > [!IMPORTANT] > Introduces a new Baml VM with bytecode generation, async runtime support, and updates to language clients and testing infrastructure. > > - **VM and Bytecode**: > - Introduces `BamlVmProgram`, `Vm`, `Function`, `Class`, `Instance`, and `Object` in `baml-vm`. > - Implements bytecode generation in `baml-compiler/src/codegen.rs`. > - Adds `Instruction` set and `Bytecode` representation in `baml-vm/src/bytecode.rs`. > - Provides debugging utilities in `baml-vm/src/debug.rs`. > - **Runtime**: > - Adds `BamlAsyncVmRuntime` in `baml-runtime/src/async_vm_runtime.rs` for async execution. > - Integrates VM with existing runtime in `baml-runtime`. > - **Testing and CLI**: > - Adds tests for VM execution in `baml-vm/tests/vm.rs`. > - Updates CLI to support HIR and bytecode dumping in `baml-runtime/src/cli/dump_intermediate.rs`. > - **Language Support**: > - Updates Python, Go, Ruby, and TypeScript clients to support new VM functions. > - Adds disassembly support in Python client in `runtime.py.j2`. > > <sup>This description was created by </sup>[<img alt="Ellipsis" src="https://img.shields.io/badge/Ellipsis-blue?color=175173">](https://www.ellipsis.dev?ref=BoundaryML%2Fbaml&utm_source=github&utm_medium=referral)<sup> for bb0191e. You can [customize](https://app.ellipsis.dev/BoundaryML/settings/summaries) this summary. It will automatically update as commits are pushed.</sup> <!-- ELLIPSIS_HIDDEN --> --------- Co-authored-by: Greg Hale <ImAlsoGreg@gmail.com> Co-authored-by: Rahul Tiwari <jprrahultiwari@gmail.com> Co-authored-by: Jesús Lapastora <jesus@boundaryml.com> Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
1 parent e163ce1 commit 5e4b946

146 files changed

Lines changed: 16057 additions & 1415 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.claude/settings.local.json‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,13 @@
3636
"Bash(tree:*)",
3737
"Bash(rg:*)",
3838
"Bash(cargo build:*)",
39+
"Bash(UPDATE_EXPECT=1 cargo test basic_class --lib)",
40+
"Bash(ln:*)",
41+
"Bash(UPDATE_EXPECT=1 cargo test basic_class)",
42+
"Bash(UPDATE_EXPECT=1 cargo test)",
43+
"Bash(UPDATE_EXPECT=1 cargo test test_class)",
44+
"Bash(UPDATE_EXPECT=1 cargo test simple_function enum_function)",
45+
"Bash(UPDATE_EXPECT=1 cargo test literal_values if_expressions let_bindings function_calls llm_functions http_calls mixed_features mixed_complex)",
3946
"Bash(npm run typecheck:*)",
4047
"Bash(npm run lint)",
4148
"Bash(npm run format:*)",

‎.cursor/rules/jj-workflow.mdc‎

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
description: Guide for using fine-grained JJ commits during development.
3+
globs:
4+
alwaysApply: true
5+
---
6+
7+
Whenever doing work:
8+
- See if you are on a bookmark or a commit with a name or description appropriate to that task
9+
- Use fine-grained tasks - if you're creating tests for TDD, put that in a separate commit
10+
- Put the feature development in another commit.
11+
- When summarizing your work, tell me the names of the commits so I can quickly look at them.

‎.devcontainer/Dockerfile‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ RUN curl -LsSf https://astral.sh/uv/install.sh | sh
3131
RUN curl https://mise.run | sh \
3232
&& ~/.local/bin/mise --verbose use -g --yes ruby@3.1 node@20.14 pnpm@9.9 \
3333
&& echo 'export PATH="$HOME/.local/bin:$HOME/.local/share/mise/shims:$PATH"' >> ~/.bash_profile \
34-
&& echo 'export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$HOME/.local/share/mise/installs/ruby/3.1/lib' >> ~/.bash_profile
34+
&& echo 'export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$HOME/.local/share/mise/installs/ruby/3.2/lib' >> ~/.bash_profile
3535

3636
# TODO: Since we already installed Mise, we can run the setup-dev.sh script
3737
# to install everything else.

‎.gitignore‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,8 @@ artifacts
161161
.direnv
162162
.rollup.cache
163163
typescript/apps/vscode-ext/dist/playground
164+
typescript/vscode-ext/packages/vscode/server/baml-cli
165+
jj-workflow.mdc
164166

165167
# mise
166168
.mise.local.toml

0 commit comments

Comments
 (0)