Skip to content

A placeholder implementation of Julia's Compiler standard library that re-exports bundled compiler with native package switching capabilities.

Notifications You must be signed in to change notification settings

JuliaLang/BaseCompiler.jl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

The Compiler standard library

The Compiler standard library module provides an interface to Julia's internal compiler APIs.

This repository manages a special v0.0.0 release of the Compiler stdlib. This version is a placeholder implementation that re‐exports the Base.Compiler module under the Compiler name. In other words, installing Compiler v0.0.0 gives you the same compiler implementation bundled with Julia runtime (Base.Compiler).

The reason for providing this placeholder version is to minimize compatibility issues between the Compiler standard library, the Julia runtime system, and dependent packages until proper versioning for the Compiler stdlib is in place. I.e. as long as you use Compiler v0.0.0, its implementation is identical to Base.Compiler, so you don’t need to worry about compatibility gaps with the Julia runtime.

Using this Compiler stdlib instead of the bundled Base.Compiler module lets you switch compiler implementations natively via the Julia package system.

For the actual compiler implementation, see the /Compiler directory in the JuliaLang/julia repository.

How to use

To utilize this Compiler.jl standard library, you need to declare it as a dependency in your Project.toml as follows:

Project.toml

[deps]
Compiler = "807dbc54-b67e-4c79-8afb-eafe4df6f2e1"

[compat]
Compiler = "0"

With the setup above, the placeholder version of Compiler (v0.0.0) will be installed by default.1

If needed, you can switch to a custom implementation of the Compiler module by running

pkg> dev /path/to/Compiler.jl # to use a local implementation

or

pkg> add https://url/of/Compiler/branch # to use a remote implementation

This feature is particularly useful for developing or experimenting with alternative compiler implementations.

Note

The Compiler.jl standard library is available starting from Julia v1.10. However, switching to a custom compiler implementation is supported only from Julia v1.12 onwards.

Warning

When using a custom, non-Base version of Compiler implementation, it may be necessary to run InteractiveUtils.@activate Compiler to ensure proper functionality of certain reflection utilities.

Footnotes

  1. Currently, only version v0.0.0 is registered in the General registry.

About

A placeholder implementation of Julia's Compiler standard library that re-exports bundled compiler with native package switching capabilities.

Resources

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

 

Packages

No packages published

Languages